<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>正中供方个人</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/extended.css">
    <!--layui-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/layui/css/layui.css"/>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>

    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
</head>

<style type="text/css">

    .Right {
        width: 100%;
        overflow-y: scroll;
    }

    .layui-col-md3 {
        width: 25%;
    }

    .layui-tab {
        margin: 50px 0;
        text-align: left !important;
        border-radius: 10px;
        margin-left: 30px;
        width: 93%;
        padding: 1% 2%;
        margin: 30px auto;
        border-radius: 10px 10px 0px 0px;
        margin: 20px 1px;
    }

    .layui-tab-content {
        padding: 0px;
    }

    .layui-tab-title {
        position: relative;
        left: 0;
        height: 40px;
        white-space: nowrap;
        font-size: 0;
        border-bottom-width: 1px;
        border-bottom-style: solid;
        transition: all .2s;
        -webkit-transition: all .2s;
        background-color: white;
        border-radius: 10px 10px 0px 0px;
    }

    .layui-form-item .layui-inline {
        margin-right: 0px;
    }

    layui-form-label {
        padding: 9px 0px;
    }

    .layui-table-tool-self {
        display: none;
    }

    .myDataCentereTwo ul li:first-child img {
        border: none;
        width: 90px;
        height: 90px;
        border-radius: 0px;
    }

    .myDataCentere ul li label {
        width: 26%;
    }

    .layui-table-tool-self {
        display: none;
    }

    .layui-table-edit {
        height: 100%
    }

    .layui-table-cell {
        height: 100%;
    }

    /* 设置下拉框的高度与表格单元相同 */
    /*td .layui-form-select {*/
    /*    margin-top: -10px;*/
    /*    margin-left: -15px;*/
    /*    margin-right: -15px;*/
    /*}*/

    .layui-col-md7 {
        width: 58.33333333%;
        padding-left: 10%;
    }

    .layui-laypage-limits {
        width: 120px;
    }

    .layui-tab-brief > .layui-tab-title .layui-this {
        color: #5775EF;
    }

    .layui-tab-brief > .layui-tab-more li.layui-this:after, .layui-tab-brief > .layui-tab-title .layui-this:after {
        border-bottom: 2px solid #5775EF;
    }

    .layui-form-select dl dd.layui-this {
        background-color: #5775EF;
    }

    img[src=""], img:not([src]) {
        opacity: 0;
    }
</style>

<body>
<!--容器-->
<div class="container index clearfix">
    <!--右侧内容-->
    <div class="Right fr" style="overflow-y: hidden;">

        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin-top: 12px;">
            <ul class="layui-tab-title" style="padding-top: 20px;padding-left: 20px;">
                <li class="layui-this">个人信息</li>
                <li <#if (shenhe == '1')>style="display: none"</#if>>个人设置</li>
                <li <#if (shenhe == '1')>style="display: none"</#if>>修改密码</li>
                <li <#if (shenhe == '1')>style="display: none"</#if>>项目评分</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <form action="" class="layui-form" enctype="multipart/form-data">
                        <!--个人信息-->
                        <div class="myDatatTop whitebg">
                            <div class="myDataCentere"
                                 style="margin-top: 0px;margin-left: 0px;  margin-bottom: 20px; width: 96%;">
                                <ul class="clearfix" style="width: 85%;padding-bottom: 23px;">
                                    <li class="clearfix">
                                        <label class="fl">角色</label>
                                        <input type="text" class="fl" value="${user.gxname}" disabled>
                                    </li>
                                    <li class="clearfix">
                                        <label class="fl">业务类型</label>
                                        <input type="text" class="fl" value="${user.ywname}" disabled>
                                    </li>
                                    <li class="clearfix">
                                        <label class="fl">身份</label>
                                        <input type="text" class="fl" value="${user.ptname}" disabled>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <div class="myData whitebg" style="margin-left: 0px;width: 96%;">
                            <span class="audit-status audit-status1" style="color: green"
                                  <#if (user.auditStatus != '1')>hidden</#if>>审核通过</span>
                            <span class="audit-status audit-status3" style="color: darkorange"
                                  <#if (user.auditStatus != '3')>hidden</#if>>审核中</span>
                            <span class="audit-status audit-status2 red" <#if (user.auditStatus != '2')>hidden</#if>>信息审核未通过，驳回原因：${user.auditFailReason}</span>
                            <h2 class="pt20 bold">一、个人基本信息</h2>
                            <div class="myDataCentere myDataCentereTwo mt30">
                                <ul class="clearfix" style="width: 90%">
                                    <li class="clearfix">
                                        <label class="fl">证件照片</label>
                                        <label>
                                            <div class="fl">
                                                <#if "${file}" !="${null}" && (file.xgtx) != "${null}">
                                                    <img class="ml50" src="${file.xgtx}" alt="" id="img7">
                                                <#else>
                                                    <img class="layui-upload-img ml50" id="img7"
                                                         src="/plugin/common/images/zzlogo.jpg">
                                                </#if>
                                                <button type="button" lay-data="{type: '208',imgid:'img7'}"
                                                        class="gr_upload whitebutton ft12 blue ml50">修改证件照
                                                </button>
                                            </div>
                                        </label>
                                    </li>
                                    <li class="clearfix"><label class="fl"><span class="red">*</span> 用户名</label>
                                        <input type="text" name="username" id="username" value="${user.username}"
                                               disabled>
                                        <input id="id" type="hidden" name="id" value="${user.id}">
                                        <#-- <input type="text" value="username"  lay-verify="username"  placeholder="请输入用户名">-->
                                    </li>
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 真实姓名</label>
                                        <input type="text" name="realName" id="realName" lay-maxlength="40"
                                               lay-verify="required|maxlength" class="fl" value="${user.realName}">
                                    </li>
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 出生年月日</label>
                                        <input type="text" name="birthday" id="birthday" class="fl" lay-maxlength="40"
                                               lay-verify="required|maxlength" value="${user.birthday}">
                                    </li>
                                    <#--                                    <li class="clearfix">-->
                                    <#--                                        <label class="fl"><span class="red">*</span> 身份证号</label>-->
                                    <#--                                        <input type="text" name="cardId" id="cardId" class="fl" lay-verify="cardId" value="${user.cardId}">-->
                                    <#--                                    </li>-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 性别</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="sex" id="sex" lay-verify="sex" style="width: 30% !important;"
                                                    lay-verify="required">
                                                <option value=""></option>
                                                <#if "${user.sex}" =="1">
                                                    <option value="1" selected="true">男</option>
                                                <#else>
                                                    <option value="1">男</option>
                                                </#if>
                                                <#if "${user.sex}" =="0">
                                                    <option value="0" selected="true">女</option>
                                                <#else>
                                                    <option value="0">女</option>
                                                </#if>
                                            </select>
                                        </div>
                                    </li>
                                    <!--民族开始-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 民族</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="nation" id="nation" style="width: 30% !important;"
                                                    lay-verify="required">
                                                <#list nationList as vo>
                                                    <#if "${user.nation}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--民族结束-->
                                    <!--婚育状况开始-->
                                    <li class="clearfix">
                                        <label class="fl">婚育状况</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="hyStatus" id="hyStatus" lay-verify="hy_status"
                                                    style="width: 30% !important;" lay-verify="required">
                                                <option value=""></option>
                                                <#list maritalStatusList as vo>
                                                    <#if "${user.hyStatus}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--婚育状况结束-->
                                    <!--政治面貌开始-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 政治面貌</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="political" id="political" lay-verify="political"
                                                    style="width: 30% !important;" lay-verify="required">
                                                <#list politicalList as vo>
                                                    <#if "${user.political}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--政治面貌结束-->
                                    <!--加入(党、团)时间开始-->
                                    <li class="clearfix">
                                        <label class="fl">加入(党、团)时间</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <input id="joinPoliticalTime" name="joinPoliticalTime" class="w95p"
                                                   type="text" value="${user.joinPoliticalTime}">
                                        </div>
                                    </li>
                                    <!--加入(党、团)时间结束-->
                                    <!--籍贯开始-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 籍贯</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <input id="birthPlace" class="w95p" type="text" name="birthPlace"
                                                   lay-maxlength="60" lay-verify="required|maxlength"
                                                   value="${user.birthPlace}">
                                        </div>
                                    </li>
                                    <!--籍贯结束-->
                                    <!--通讯地址开始-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span> 通讯地址</label>
                                        <#--                                        <div class="layui-col-md3" style="height: 36px;width:52%">-->
                                        <#--                                            <input id="postAddress" class="w95p" type="text" name="postAddress"-->
                                        <#--                                                   lay-maxlength="60" lay-verify="required|maxlength"-->
                                        <#--                                                   value="${user.postAddress}">-->
                                        <#--                                        </div>-->
                                        <div class="clearfix mt10 divplaceselect">
                                            <select name="province" class="ml8 fl" id="province"
                                                    onchange="provinceChange(this)"
                                                    style="width:90px !important;"
                                                    lay-verify="required" lay-ignore>
                                                <option value="">请选择</option>
                                                <#list provincelist as vo>
                                                    <option value="${vo.code}"
                                                            <#if "${user.province}"=="${vo.code}">
                                                                selected
                                                            </#if>
                                                    >${vo.name}</option>
                                                </#list>
                                            </select>
                                            <select name="city" id="city" class="ml8 fl"
                                                    lay-filter="city"
                                                    onchange="cityChange(this)" lay-verify="required"
                                                    style="width: 90px !important;margin-left: 10px" lay-ignore>
                                                <option value="">请选择</option>
                                                <#list citylist as city>
                                                    <option value="${city.code}"
                                                            <#if "${user.city}"=="${city.code}">
                                                                selected
                                                            </#if>
                                                    >${city.name}</option>
                                                </#list>
                                            </select>
                                            <select name="county" id="county" class="ml8 fl" lay-filter="county"
                                                    lay-verify="required"
                                                    style="width:90px !important;margin-left: 10px" lay-ignore
                                            >
                                                <option value="">请选择</option>
                                                <#list countylist as vocounty>
                                                    <option value="${vocounty.code}"
                                                            <#if "${user.county}"=="${vocounty.code}">
                                                                selected
                                                            </#if>
                                                    >${vocounty.name}</option>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--通讯地址结束-->
                                    <!--紧急联系人开始-->
                                    <li class="clearfix">
                                        <label class="fl">紧急联系人</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <input id="emergencyContactName" class="w95p" type="text"
                                                   name="emergencyContactName" placeholder="请填写紧急联系人"
                                                   value="${user.emergencyContactName}" lay-maxlength="20"
                                                   lay-verify="maxlength">
                                        </div>
                                    </li>
                                    <!--紧急联系人结束-->
                                    <!--紧急联系电话开始-->
                                    <li class="clearfix">
                                        <label class="fl">紧急联系电话</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <input id="emergencyContractNumber" class="w95p" type="text"
                                                   name="emergencyContractNumber" placeholder="请填写紧急联系人电话"
                                                   value="${user.emergencyContractNumber}">
                                        </div>
                                    </li>
                                    <!--紧急联系电话结束-->
                                    <!--血型开始-->
                                    <li class="clearfix">
                                        <label class="fl">血型</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="bloodType" id="bloodType" style="width: 30% !important;">
                                                <option value=""></option>
                                                <#list bloodTypeList as vo>
                                                    <#if "${user.bloodType}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--血型结束-->
                                    <!--血型开始-->
                                    <li class="clearfix">
                                        <label class="fl">星座</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="constellation" id="constellation"
                                                    style="width: 30% !important;">
                                                <option value=""></option>
                                                <#list constellationList as vo>
                                                    <#if "${user.constellation}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--血型结束-->
                                    <!--属相开始-->
                                    <li class="clearfix">
                                        <label class="fl">属相</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="zodiac" id="zodiac" lay-verify="zodiac"
                                                    style="width: 30% !important;">
                                                <option value=""></option>
                                                <#list zodiacList as vo>
                                                    <#if "${user.zodiac}" =="${vo.badtCode}">
                                                        <option value="${vo.badtCode}"
                                                                selected="true">${vo.badtName}</option>
                                                    <#else>
                                                        <option value="${vo.badtCode}">${vo.badtName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--属相结束-->
                                    <!--个人公积金账号开始-->
                                    <li class="clearfix">
                                        <label class="fl">个人公积金账号</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <input id="providentFundAccountNumber" class="w95p" type="text"
                                                   name="providentFundAccountNumber" lay-maxlength="40"
                                                   lay-verify="maxlength" placeholder="请填写个人公积金账号"
                                                   value="${user.providentFundAccountNumber}">
                                        </div>
                                    </li>
                                    <!--个人公积金账号结束-->
                                    <!--所属公司开始-->
                                    <li class="clearfix">
                                        <label class="fl"><span class="red">*</span>所属公司</label>
                                        <div class="layui-col-md3" style="height: 36px;width:52%">
                                            <select name="companyName" id="companyName" lay-verify="companyName" disabled
                                                    style="width: 30% !important;" lay-verify="required">
                                                <#if !(user.companyName) || (user.companyName) == '请选择'>
                                                    <option value="请选择">请选择</option></#if>
                                                <#list companyList as vo>
                                                    <#if "${user.companyName}" =="${vo.bcId}">
                                                        <option value="${vo.bcId}" selected="true">${vo.bcName}</option>
                                                    <#else>
                                                        <option value="${vo.bcId}">${vo.bcName}</option>
                                                    </#if>
                                                </#list>
                                            </select>
                                        </div>
                                    </li>
                                    <!--所属公司结束-->
                                </ul>
                            </div>
                        </div>

                        <div class="myData whitebg pl5p" style="width:93%;">
                            <div class="myDataCentere myDataCentereThree mt30">
                                <ul class="clearfix" style="width: 95%">
                                    <!--第一学历开始-->
                                    <li class="fl clearfix user-education">
                                        <label class="fl w10p">第一学历</label>
                                        <input type="hidden" name="educations[0].suenType" value="first">
                                        <input class="imgid-0-1 imgid-0-2" type="hidden" name="educations[0].suenId"
                                               value="${firstEducation.suenId}">
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <div class="layui-col-md4">
                                                <select name="educations[0].suenName" id="firstEducationSuenName"
                                                        lay-verify="suenName" style="width: 25% !important;"
                                                        lay-verify="required">
                                                    <#if !(firstEducation.suenName) || (firstEducation.suenName) == '请选择'>
                                                        <option value="">请选择</option></#if>
                                                    <#list edulist as vo>
                                                        <#if "${firstEducation.suenName}" =="${vo.badtCode}">
                                                            <option value="${vo.badtCode}"
                                                                    selected="true">${vo.badtName}</option>
                                                        <#else>
                                                            <option value="${vo.badtCode}">${vo.badtName}</option>
                                                        </#if>
                                                    </#list>
                                                </select>
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl w100">第一学历学校</label>
                                                <div class="fl">
                                                    <input class="w90p ml60" type="text"
                                                           name="educations[0].suenSchoolName" placeholder="请输入第一学历学校"
                                                           value="${firstEducation.suenSchoolName}"
                                                           lay-verify="suenSchoolName">
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="fl clearfix">
                                        <label class="fl w10p">第一学历专业</label>
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <div class="layui-col-md4">
                                                <input class="w90p" type="text" name="educations[0].suenSubject"
                                                       placeholder="请输入第一学历专业" value="${firstEducation.suenSubject}"
                                                       lay-verify="suenSubject">
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl w100">第一学历时间</label>
                                                <div class="fl">
                                                    <input id="firstEducationTime" class="w90p ml60" type="text"
                                                           name="educations[0].suenTime" placeholder="请输入第一学历时间"
                                                           value="${firstEducation.suenTime}" lay-verify="suenTime">
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <div class="layui-row">
                                        <div class="layui-col-sm5 xueli-div">
                                            <li class="layui-col-sm12">
                                                <label class="fl w20p">学历证明</label>
                                                <label>
                                                    <div class="fl clearfix">
                                                        <div class="upCard fl mt10" style="margin-left:55px">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button"
                                                                    lay-data="{type: '555',imgid: 'imgid-0-1'}"
                                                                    class="gr_upload whitebutton ml20"
                                                                    style="padding-left:12px">上传学历证明
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div style="position: relative;float: left;">
                                                    <#if "${file}" !="${null}" && (file.firstxlzm) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor: pointer;"
                                                             data-type="555" data-id="imgid-0-1"
                                                             id="delimgid-0-1"
                                                             onclick="deleteImg('${file.firstxlzm}', 1, this)"/>
                                                        <img id="imgid-0-1"
                                                             class="layui-upload-img edu_img mt10 ml20 cursor"
                                                             height="100" width="150" style="margin-left:20px"
                                                             src="${file.firstxlzm}" onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor: pointer;display: none;"
                                                             id="delimgid-0-1"
                                                             data-type="555" data-id="imgid-0-1"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img id="imgid-0-1" style="display: none"
                                                             class="layui-upload-img edu_img mt10 ml20 cursor"
                                                             certid="${firstEducation.suenId}" height="100" width="150"
                                                             style="margin-left:20px" onclick="showImg(this)">
                                                    </#if>
                                                </div>
                                            </li>
                                        </div>

                                        <div class="layui-col-sm5 xunxin-div" style="margin-left: 6%">
                                            <li class="layui-col-sm12">
                                                <label class="fl w100">学信网图片</label>
                                                <label>
                                                    <input type="hidden" id="firstEducationXuexinFile"
                                                           class="xuexin-file imgid-0-2"
                                                           name="educations[0].suenXuexinFile"
                                                           value="${firstEducation.suenXuexinFile}">
                                                    <div class="fl clearfix" style="margin-left:44px">
                                                        <div class="upCard fl ml20 mt10">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button"
                                                                    lay-data="{type: '556',imgid: 'imgid-0-2'}"
                                                                    class="gr_upload whitebutton"
                                                                    style="padding-left:4px">上传学信网图片
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div style="position: relative;float: left;">

                                                    <#--                                                    <#if "${firstEducation}" !="${null}"  && (firstEducation.suenXuexinFile) != "${null}" && (firstEducation.suenXuexinFile) != "">-->
                                                    <#if "${file}" !="${null}" && (file.firstxlxx) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="556" data-id="imgid-0-2"
                                                             onclick="deleteImg('${file.firstxlxx}', 1, this)"/>
                                                        <img id="imgid-0-2"
                                                             class="layui-upload-img edu_img ml20 mt10 cursor"
                                                             height="100" width="150"
                                                             src="${file.firstxlxx}" onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;display: none;"
                                                             id="delimgid-0-2"
                                                             data-type="556" data-id="imgid-0-2"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img id="imgid-0-2" style="display: none"
                                                             class="layui-upload-img edu_img mt10 ml20 cursor"
                                                             certid="${firstEducation.suenId}" height="100" width="150"
                                                             onclick="showImg(this)">
                                                    </#if>
                                                </div>
                                            </li>
                                        </div>
                                    </div>
                                    <!--第一学历结束-->

                                    <!--最终学历开始-->
                                    <li class="fl clearfix user-education">
                                        <label class="fl w10p"><span class="red">*</span>最终学历</label>
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <input type="hidden" name="educations[1].suenType" value="last">
                                            <input class="imgid-1-1 imgid-1-2 ml20" type="hidden"
                                                   name="educations[1].suenId" value="${lastEducation.suenId}">
                                            <div class="layui-col-md4">
                                                <select name="educations[1].suenName" id="last-education"
                                                        style="width: 25% !important;" lay-verify="required">
                                                    <#if !(lastEducation.suenName) || (lastEducation.suenName) == '请选择'>
                                                        <option value="">请选择</option></#if>
                                                    <#list edulist as vo>
                                                        <#if "${lastEducation.suenName}" =="${vo.badtCode}">
                                                            <option value="${vo.badtCode}"
                                                                    selected="true">${vo.badtName}</option>
                                                        <#else>
                                                            <option value="${vo.badtCode}">${vo.badtName}</option>
                                                        </#if>
                                                    </#list>
                                                </select>
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl w100">最终学历学校</label>
                                                <div class="fl">
                                                    <input class="w90p ml60" type="text"
                                                           name="educations[1].suenSchoolName" placeholder="请输入最终学历学校"
                                                           value="${lastEducation.suenSchoolName}" lay-maxlength="40"
                                                           lay-verify="maxlength">
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="fl clearfix">
                                        <label class="fl w10p">最终学历专业</label>
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <div class="layui-col-md4">
                                                <input class="w90p" type="text" name="educations[1].suenSubject"
                                                       placeholder="请输入最终学历专业" value="${lastEducation.suenSubject}"
                                                       lay-maxlength="40" lay-verify="maxlength">
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl w100">最终学历时间</label>
                                                <div class="fl">
                                                    <input id="lastEducationTime" class="w90p ml60" type="text"
                                                           name="educations[1].suenTime" placeholder="请输入最终学历时间"
                                                           value="${lastEducation.suenTime}">
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <div class="layui-row">
                                        <div class="layui-col-sm5 xueli-div">
                                            <li class="layui-col-sm12">
                                                <label class="fl w20p">学历证明</label>
                                                <label>
                                                    <input id="lastEducationCertFile"
                                                           class="education-cert-file imgid-1-1" type="hidden"
                                                           name="educations[1].suenCertFile"
                                                           value="${lastEducation.suenCertFile}">
                                                    <div class="fl clearfix">
                                                        <div id="last_xl_div" class="upCard fl mt10"
                                                             style="margin-left:55px">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button"
                                                                    lay-data="{type: '557',imgid: 'imgid-1-1'}"
                                                                    class="gr_upload whitebutton ml20"
                                                                    style="padding-left:12px">上传学历证明
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div style="position: relative;float: left;">
                                                    <#--                                                    <#if "${lastEducation}" !="${null}"  && (lastEducation.suenCertFile) != "${null}" && (lastEducation.suenCertFile) != " ">-->
                                                    <#if "${file}" !="${null}" && (file.lastxlzm) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="557" data-id="imgid-1-1"
                                                             onclick="deleteImg('${file.lastxlzm}', 1, this)"/>
                                                        <img id="imgid-1-1"
                                                             class="layui-upload-img edu_img mt10 last_xl_img ml20 cursor"
                                                             height="100" width="150"
                                                             src="${file.lastxlzm}" onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             id="delimgid-1-1"
                                                             data-type="557" data-id="imgid-1-1"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img id="imgid-1-1" style="display: none"
                                                             class="layui-upload-img edu_img mt10 last_xl_img ml20 cursor"
                                                             certid="${lastEducation.suenId}" height="100" width="150"
                                                             style="margin-left:20px" onclick="showImg(this)">
                                                    </#if>
                                                </div>
                                            </li>
                                        </div>

                                        <div class="layui-col-sm5" style="margin-left: 6%">
                                            <li class="layui-col-sm12">
                                                <label class="fl w100">学信网图片</label>
                                                <label>
                                                    <input type="hidden" id="lastEducationXuexinFile"
                                                           class="xuexin-file imgid-1-2"
                                                           name="educations[1].suenXuexinFile"
                                                           value="${lastEducation.suenXuexinFile}">
                                                    <div class="fl clearfix" style="margin-left:44px">
                                                        <div id="last_xx_div" class="upCard fl ml20 mt10">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button"
                                                                    lay-data="{type: '558',imgid: 'imgid-1-2'}"
                                                                    class="gr_upload whitebutton"
                                                                    style="padding-left:4px">上传学信网图片
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div style="position: relative;float: left;">
                                                    <#--                                                    <#if "${lastEducation}" !="${null}"  && (lastEducation.suenXuexinFile) != "${null}" && (lastEducation.suenXuexinFile) != " ">-->
                                                    <#if "${file}" !="${null}" && (file.lastxlxx) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="558" data-id="imgid-1-2"
                                                             onclick="deleteImg('${file.lastxlxx}', 1, this)"/>
                                                        <img id="imgid-1-2"
                                                             class="layui-upload-img edu_img ml20 mt10 last_xx_img cursor"
                                                             height="100" width="150"
                                                             src="${file.lastxlxx}" onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             id="delimgid-1-2"
                                                             data-type="558" data-id="imgid-1-2"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img id="imgid-1-2" style="display: none"
                                                             class="layui-upload-img edu_img mt10 ml20 last_xx_img cursor"
                                                             certid="${lastEducation.suenId}" height="100" width="150"
                                                             onclick="showImg(this)">
                                                    </#if>
                                                </div>
                                            </li>
                                        </div>
                                    </div>
                                    <!--最终学历结束-->

                                    <li class="fl clearfix">
                                        <label class="fl w10p">参加工作时间</label>
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <div class="layui-col-md4">
                                                <input id="goWorkInput" class="w90p" type="text" name="goWorkTime"
                                                       placeholder="请输入参加工作时间" value="${user.goWorkTime}">
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl">到公司时间</label>
                                                <div class="fl">
                                                    <input id="arrivalCompanyInput" class="w90p ml60"
                                                           style="margin-left:68px" type="text"
                                                           name="arrivalCompanyTime" placeholder="请输入到公司时间"
                                                           value="${user.arrivalCompanyTime}">
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="fl clearfix">
                                        <label class="fl w10p"><span class="red">*</span>移动电话</label>
                                        <div class="fl clearfix layui-row ml20 w80p">
                                            <div class="layui-col-md4">
                                                <input class="w90p" type="text" name="phoneNumber" placeholder="请输入移动电话"
                                                       value="${user.phoneNumber}" lay-verify="required|phone">
                                            </div>
                                            <div class="layui-col-md7">
                                                <label class="fl">身份证号码</label>
                                                <div class="fl">
                                                    <input class="w90p ml60" style="margin-left:68px" type="text"
                                                           name="cardId" placeholder="请输入身份证号码" value="${user.cardId}">
                                                </div>
                                            </div>
                                        </div>
                                    </li>

                                    <li class="clearfix">
                                        <label class="fl w10p">上传身份证</label>
                                        <div class="fl clearfix layui-row">
                                            <div class="layui-col-md6">
                                                <label>
                                                    <div class="fl clearfix" style="margin-right: 20px;">
                                                        <div id="id_front_div" class="upCard fl ml20">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button" lay-data="{type: '204',imgid:'img'}"
                                                                    class="gr_upload whitebutton">上传身份证正面
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div class="layui-upload-list" style="position: relative;float: left;">
                                                    <#if "${file}" !="${null}" && (file.sfzz) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             data-type="204" data-id="img"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             onclick="deleteImg('${file.sfzz}', 1, this)"/>
                                                        <img class="layui-upload-img id_front_img cursor" id="img"
                                                             height="100" width="150"
                                                             src="${file.sfzz}"
                                                             style="margin-left: 20px;margin-top: 10px;"
                                                             onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             data-type="204" data-id="img"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             id="delimg"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img class="layui-upload-img id_front_img cursor" id="img"
                                                             height="100" width="150"
                                                             style="display:none;margin-left: 20px;margin-top: 10px;"
                                                             onclick="showImg(this)">
                                                    </#if>
                                                    <p id="demoText"></p>
                                                </div>
                                            </div>
                                            <div class="layui-col-md6">
                                                <label>
                                                    <div class="fl clearfix" style="margin-right: 20px;">
                                                        <div id="id_back_div" class="upCard fl ml20">
                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                 alt="">
                                                            <button type="button" lay-data="{type: '205',imgid:'img4'}"
                                                                    class="gr_upload whitebutton">上传身份证反面
                                                            </button>
                                                        </div>
                                                    </div>
                                                </label>
                                                <div class="layui-upload-list" style="position: relative;float: left;">
                                                    <#if "${file}" !="${null}" && (file.sfzf) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             id="delimg4"
                                                             data-type="205" data-id="img4"
                                                             onclick="deleteImg('${file.sfzf}', 1, this)"/>
                                                        <img class="layui-upload-img id_back_img cursor" id="img4"
                                                             height="100" width="150"
                                                             src="${file.sfzf}"
                                                             style="margin-left: 20px;margin-top: 10px;"
                                                             onclick="showImg(this)">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             id="delimg4"
                                                             data-type="205" data-id="img4"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img class="layui-upload-img id_back_img cursor" id="img4"
                                                             height="100" width="150"
                                                             style="display:none;margin-left: 20px;margin-top: 10px;"
                                                             onclick="showImg(this)">
                                                    </#if>
                                                    <p id="demoText"></p>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <!--擅长领域开始-->
                                    <li class="clearfix w100p">
                                        <label class="fl" style="width:9%"><span
                                                    style="color: red;">*</span>擅长领域</label>
                                        <div class="pt8 fl w80p" lay-verify="doBest">
                                            <#list doBestList as vo>
                                                <div style="display: inline-block">
                                                    <input type="checkbox" class="fl h15 w25 doBestInput"
                                                           name="doBest"
                                                           value="${vo.badtCode}"
                                                           <#if vo.badtNote == 1>checked</#if>
                                                           lay-ignore
                                                           onchange="dobestChange()">
                                                    <span class="fl mr10"
                                                          style="margin-top:-2px">${vo.badtName}</span>
                                                </div>
                                            </#list>
                                        </div>
                                        <#--                                        <input type="text" name="education" id="education" lay-verify="education" class="fl" value="${user.education}">-->
                                    </li>
                                    <!--擅长领域结束-->
                                    <!--是否接受出差开始-->
                                    <li class="clearfix">
                                        <label class="fl w10p" style="width:9%"><span style="color: red;">*</span>是否接受出差</label>
                                        <div class="layui-col-md3" style="height: 36px;width:20%">
                                            <select name="bussTravel" id="bussTravel" lay-verify="bussTravel"
                                                    style="width: 30% !important;">
                                                <option vslue=""
                                                        <#if user.bussTrabvel == null>selected="true"</#if>></option>
                                                <option value="1" <#if user.bussTravel == 1>selected="true"</#if>>是
                                                </option>
                                                <option value="0" <#if user.bussTravel == 0>selected="true"</#if>>否
                                                </option>
                                            </select>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="myData whitebg bg_area">
                            <h2 class="pt20 bold">二、已婚员工家庭信息</h2>
                            <div class="layui-row mt20">
                                <div class="layui-col-sm3 w30p">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr12">配偶姓名</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input type="hidden" name="familys[0].sufRelationship" value="3">
                                        <input type="hidden" name="familys[0].ind" value="1">
                                        <input type="hidden" name="familys[0].sufId" value="${spouse.sufId}">
                                        <input class="pl10" name="familys[0].sufName" type="text" placeholder="请输入配偶姓名"
                                               value="${spouse.sufName}">
                                    </div>
                                </div>
                                <div class="layui-col-sm3 w30p">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr12">配偶工作单位</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="familys[0].sufWorkCompanyName" type="text"
                                               placeholder="请输入配偶工作单位" value="${spouse.sufWorkCompanyName}">
                                    </div>
                                </div>
                            </div>
                            <div class="childs">

                            </div>

                            <div class="layui-row mt20" <#if (shenhe == '1')>style="display: none"</#if>>
                                <div class="layui-col-md2  layui-col-md-offset5">
                                    <img src="${re.contextPath}/plugin/common/images/add.png"
                                         onclick="addOneChild()" alt="" class="cursor"
                                         style="width:32px">
                                    <span>添加子女信息</span>
                                </div>
                            </div>
                        </div>
                        <div class="myData whitebg bg_area">
                            <h2 class="pt20 bold">三、工作状况</h2>
                            <div class="layui-row mt20">
                                <div class="layui-col-sm5">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20"><span style="color: red;">*</span>所在部门</span>
                                    </div>
                                    <div class="layui-col-sm8" style="width: 63%">
                                        <select name="nowWork.deptCode" id="deptCode" lay-verify="required">
                                            <option <#if "${nowWork.deptCode}" == ""></#if> value="" selected disabled
                                                                                            style="display: none">请选择
                                            </option>
                                            <#list deptList as vo>
                                                <#if "${nowWork.deptCode}" =="${vo.badtCode}">
                                                    <option value="${vo.badtCode}"
                                                            selected="true">${vo.badtName}</option>
                                                <#else>
                                                    <option value="${vo.badtCode}">${vo.badtName}</option>
                                                </#if>
                                            </#list>
                                        </select>
                                        <input name="nowWork.ifNow" type="hidden" value="1">
                                    </div>
                                </div>
                                <div class="layui-col-sm5 layui-col-sm-offset1">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">到部门时间</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input id="arrival_dept_time" class="pl10" name="nowWork.startDate" type="text"
                                               placeholder="请输入到部门时间" value="${nowWork.startDate}">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row mt20">
                                <div class="layui-col-sm5">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">办公地点</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.workPlace" type="text" placeholder="请输入办公地点"
                                               value="${nowWork.workPlace}">
                                    </div>
                                </div>
                                <div class="layui-col-sm5 layui-col-sm-offset1">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">职称</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.professor" type="text" placeholder="请输入职称"
                                               value="${nowWork.professor}">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row mt20">
                                <div class="layui-col-sm5">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">职务</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.duty" type="text" placeholder="请输入职务"
                                               value="${nowWork.duty}">
                                    </div>
                                </div>
                                <div class="layui-col-sm5 layui-col-sm-offset1">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">从事岗位</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.station" type="text" placeholder="请输入从事岗位"
                                               value="${nowWork.station}">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row mt20">
                                <div class="layui-col-sm5">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">人员状态</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.personStatus" type="text"
                                               placeholder="请输入人员状态" value="${nowWork.personStatus}">
                                    </div>
                                </div>
                                <div class="layui-col-sm5 layui-col-sm-offset1">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">办公电话</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="nowWork.officeTelephone" type="text"
                                               placeholder="请输入办公电话" value="${nowWork.officeTelephone}">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row mt20">
                                <div class="layui-col-sm5">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20" style="padding-top:1px"><span
                                                    class="red">*</span>个人电子信箱</span>
                                    </div>
                                    <div class="layui-col-sm8">
                                        <input class="pl10" name="email" type="text" placeholder="请输入个人电子信箱"
                                               value="${user.email}" lay-verify="required" onBlur="checkEmail(this)">
                                    </div>
                                </div>
                                <div class="layui-col-sm5 layui-col-sm-offset1">
                                    <div class="layui-col-sm4">
                                        <span class="fr pr20">岗位职称</span>
                                    </div>
                                    <div class="layui-col-sm8" style="width:63%">
                                        <#--                                        <input class="pl10" name="nowWork.stationProfessor" type="text" placeholder="请输入岗位职称" value="${nowWork.stationProfessor}">-->
                                        <select name="nowWork.stationProfessor" id="stationProfessor">
                                            <option value=""></option>
                                            <#list gwzcList as vo>
                                                <#if "${nowWork.stationProfessor}" =="${vo.badtCode}">
                                                    <option value="${vo.badtCode}"
                                                            selected="true">${vo.badtName}</option>
                                                <#else>
                                                    <option value="${vo.badtCode}">${vo.badtName}</option>
                                                </#if>
                                            </#list>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row mt20">
                                <div class="layui-col-sm5 ssplace">
                                    <div class="layui-col-sm4">
                                        <label class="fr pr20"><span style="color: red">*</span> 负责地区</label>
                                    </div>
                                    <#if placeList?? && (placeList?size > 0) >
                                        <#list placeList as place>
                                            <div class="layui-col-sm8 divplaceselect">
                                                <select name="projectPlacedtos[0].province" class="ml8 fl"
                                                        id="placeprovince0"
                                                        onchange="provinceChange(this)"
                                                        style="width:90px !important;"
                                                        lay-verify="required" lay-ignore>
                                                    <option value="">请选择</option>
                                                    <#list provincelist as vo>
                                                        <option <#if "${vo.code}"=="${place.province}">selected</#if>
                                                                value="${vo.code}">${vo.name}</option>
                                                    </#list>
                                                </select>
                                                <select name="projectPlacedtos[0].city" id="placecity0" class="ml8 fl"
                                                        lay-filter="city"
                                                        onchange="cityChange(this)" lay-verify="required"
                                                        style="width: 90px !important;margin-left: 10px" lay-ignore>
                                                    <option value="">请选择</option>
                                                    <#list place.citys as city>
                                                        <option value="${city.code}"
                                                                <#if "${place.city}"=="${city.code}">
                                                                    selected
                                                                </#if>
                                                        >${city.name}</option>
                                                    </#list>
                                                </select>
                                                <img src="${re.contextPath}/plugin/common/images/77@2x.png"
                                                     style="width: 28px;"
                                                     class="fl ml10 addplaceimage" onclick="addPlace(this)">
                                                <img src="${re.contextPath}/plugin/common/images/76@2x.png"
                                                     style="width: 28px;"
                                                     class="fl ml10"
                                                     onclick="deletePlace(this)">
                                            </div>
                                        </#list>
                                    <#else>
                                        <div class="layui-col-sm8 divplaceselect">
                                            <select name="projectPlacedtos[0].province" class="ml8 fl"
                                                    id="placeprovince0"
                                                    onchange="provinceChange(this)"
                                                    style="width:90px !important;"
                                                    lay-verify="required" lay-ignore>
                                                <option value="">请选择</option>
                                                <#list provincelist as vo>
                                                    <option value="${vo.code}">${vo.name}</option>
                                                </#list>
                                            </select>
                                            <select name="projectPlacedtos[0].city" id="placecity0" class="ml8 fl"
                                                    lay-filter="city"
                                                    onchange="cityChange(this)" lay-verify="required"
                                                    style="width: 90px !important;margin-left: 10px" lay-ignore>
                                                <option value="">请选择</option>
                                                <#list place.citys as city>
                                                    <option value="${city.code}">${city.name}</option>
                                                </#list>
                                            </select>
                                            <img src="${re.contextPath}/plugin/common/images/77@2x.png"
                                                 style="width: 28px;"
                                                 class="fl ml10 addplaceimage" onclick="addPlace(this)">
                                            <img src="${re.contextPath}/plugin/common/images/76@2x.png"
                                                 style="width: 28px;"
                                                 class="fl ml10"
                                                 onclick="deletePlace(this)">
                                        </div>
                                    </#if>
                                </div>
                            </div>
                        </div>

                        <!--技术特长开始-->
                        <div class="constructionUnitBox whitebg work_history w100p" style="width: 94%!important;">
                            <div class="layui-row"><span class="ft22 work_history_title">四、技术特长</span></div>
                            <div class="layui-row mt20">
                                <div class="layui-col-sm1 w8p" class="special-title">技术特长</div>
                                <div class="layui-col-sm10">
                                    <textarea id="techSpecial" class="special-content" onKeyDown="LimitTextArea(this)"
                                              onKeyUp="LimitTextArea(this)"
                                              onkeypress="LimitTextArea(this)">${user.techSpecial}</textarea>
                                </div>
                            </div>
                        </div>
                        <!--技术特长结束-->
                        <!--其他特长开始-->
                        <div class="constructionUnitBox whitebg work_history w100p" style="width: 94%!important;">
                            <div class="layui-row"><span class="ft22 work_history_title">五、其他特长</span></div>
                            <div class="layui-row mt20">
                                <div class="layui-col-sm1 w8p" class="special-title">其他特长</div>
                                <div class="layui-col-sm10">
                                    <textarea id="otherSpecial" class="special-content" onKeyDown="LimitTextArea(this)"
                                              onKeyUp="LimitTextArea(this)"
                                              onkeypress="LimitTextArea(this)">${user.otherSpecial}</textarea>
                                </div>
                            </div>
                        </div>
                        <!--其他特长结束-->
                        <div class="myDataBtn center">
                            <button class="bluebg white bor0" lay-filter="submitUser" lay-submit type="button">保存
                            </button>
                        </div>

                    </form>

                    <!--工作经历/项目经历开始-->
                    <div class="constructionUnitBox whitebg work_history" style="width: 94%">
                        <div id="work_pro_history">
                            <div class="layui-row"><span class="ft22 work_history_title">六、工作经历/项目经历</span></div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md1 layui-col-md-offset10">
                                <input type="button" class="layui-btn layui-btn-normal work-save-btn" value="保存"
                                       onclick="saveWorks()">
                            </div>
                        </div>
                        <div class="layui-row" <#if (shenhe == '1')>style="display: none"</#if>>
                            <div class="col-md-2 layui-col-md-offset5 bluebg cursor"
                                 style="display: inline-block; width: 200px; padding: 0 20px; height: 50px; line-height: 50px;border-radius: 3px"
                                 onclick="addHis()">
                                <img src="${re.contextPath}/plugin/common/images/add-white.png"
                                     alt="" class="cursor"
                                     style="width:30px; margin: 10px;">
                                <span class="white">添加工作/项目经历</span>
                            </div>
                        </div>
                    </div>
                    <!--工作经历/项目经历结束-->
                    <!--教育经历开始-->
                    <div class="constructionUnitBox whitebg work_history study_history" style="width: 94%;">
                        <div class="layui-row"><span class="ft22 work_history_title">七、教育经历(从高中开始填写)</span></div>
                        <div class="history_out_0 a_edu_history bg_area">
                            <div class="study_0 study"></div>
                            <div class="layui-row">
                                <div class="layui-col-md2  layui-col-md-offset5"
                                     <#if (shenhe == '1')>style="display: none"</#if>>
                                    <img src="${re.contextPath}/plugin/common/images/add.png"
                                         onclick="addOneStudy()" alt="" class="cursor"
                                         style="width:32px">
                                    <span>添加教育经历</span>
                                </div>
                                <div class="layui-col-md1 layui-col-md-offset4">
                                    <input type="button" class="layui-btn layui-btn-normal" ind="0" value="保存"
                                           onclick="saveStudy()">
                                </div>
                            </div>
                            <!--一个工教育经历结束-->
                        </div>
                    </div>
                    <!--工作经历/项目经历结束-->
                    <!--培训经历开始-->
                    <div class="constructionUnitBox whitebg work_history" style="width: 94%;">
                        <div class="layui-row"><span class="ft22 work_history_title">八、培训经历</span></div>
                        <div class="history_out_0 bg_area bg_area" style="width:100%">
                            <div class="study_0 train"></div>
                            <!--一个工教育经历结束-->
                            <div class="layui-row" <#if (shenhe == '1')>style="display: none"</#if>>
                                <div class="layui-col-md2  layui-col-md-offset5">
                                    <img src="${re.contextPath}/plugin/common/images/add.png"
                                         onclick="addOneTrain()" alt="" class="cursor"
                                         style="width:32px">
                                    <span>添加培训经历</span>
                                </div>
                                <div class="layui-col-md1 layui-col-md-offset4">
                                    <input type="button" class="layui-btn layui-btn-normal" ind="0" value="保存"
                                           onclick="saveTrain(this)">
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--培训经历结束-->
                    <!--资质证明开始-->
                    <div class="constructionUnitBox whitebg work_history w100p" style="width: 94%!important;">
                        <div id="certificate_history">
                            <div class="layui-row"><span class="ft22 work_history_title">九、资质证明</span></div>
                            <!--一个资质证明开始-->
                            <#list userCertList as cert>
                                <div class="history_out_0 a_cert_history">
                                    <input type="hidden" value="${cert.sucId}" class="cert_id_input">
                                    <div id="certificate_history_0 certificate_history_out">
                                        <div class="certificate_history_out a_history_head layui-row certificate_history_0 layui-form-item">
                                            <div class="layui-inline  layui-col-md3 ">
                                                <label class="layui-form-label layui-col-md4"
                                                       style="padding:9px 5px 9px 0px">获得时间</label>
                                                <div class="layui-col-md7 ml10">
                                                    <input id="cert_getDate_input${cert_index}" type="text"
                                                           name="getDate" value="${cert.getDate}" lay-verify="date"
                                                           placeholder="获得时间" autocomplete="off"
                                                           class="layui-input w100p certificate_getDate">
                                                </div>
                                            </div>
                                            <div class="layui-inline layui-col-md3">
                                                <label class="layui-form-label">证书名称</label>
                                                <div class="layui-input-block">
                                                    <select class="w90p certificateName" name="certificateName"
                                                            lay-verify="required">
                                                        <option value="">请选择</option>
                                                        <#list certNameList as vo>
                                                            <option <#if vo.badtCode == cert.certificateName>selected="selected"</#if>
                                                                    value="${vo.badtCode}">${vo.badtName}</option>
                                                        </#list>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-inline layui-col-md3 w20p">
                                                <label class="layui-form-label">证书级别</label>
                                                <div class="layui-input-block">
                                                    <select class="w90p certificateLevel">
                                                        <option value="">请选择</option>
                                                        <#list certLevelList as vo>
                                                            <option <#if vo.badtCode == cert.certificateLevel>selected="selected"</#if>
                                                                    value="${vo.badtCode}">${vo.badtName}</option>
                                                        </#list>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-inline layui-col-md3 w20p">
                                                <label class="layui-form-label">发证机关</label>
                                                <div class="layui-input-block">
                                                    <input type="text" lay-verify="title" autocomplete="off"
                                                           placeholder="请输入发证机关" class="layui-input issuingOrg"
                                                           value="${cert.issuingOrg}" onBlur="inputBlur(this)">
                                                </div>
                                            </div>
                                            <div class="layui-inline w10p">
                                                <div class="layui-col-md2 layui-col-md-offset3 imgUrl">
                                                    <img src="${re.contextPath}/plugin/common/images/del.png"
                                                         <#if (shenhe == '1')>style="display: none"</#if>
                                                         onclick="delCert(this)" alt="" class="fr cursor" ind="0"
                                                         style="width:32px">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md12">
                                                <label class="layui-form-label layui-col-md4"
                                                       style="padding:9px 5px 9px 0px">证书图片</label>
                                                <div class="fl clearfix mt20 layui-col-md8">
                                                    <label>
                                                        <div class="fl clearfix" style="margin-right: 20px;">
                                                            <div id="zz_div" class="upCard fl ml20">
                                                                <img src="${re.contextPath}/plugin/common/images/57@2x.png"
                                                                     alt="">
                                                                <button type="button"
                                                                        lay-data="{type: '551',imgid:'cert-img${cert_index}'}"
                                                                        class="gr_upload whitebutton ml0 pl10 w125 h10"
                                                                        style="padding-left:25px">证书图片
                                                                </button>
                                                            </div>
                                                        </div>
                                                    </label>
                                                    <div style="position: relative;float: left;">
                                                        <#if "${cert.imgUrl}" !="" && (cert.imgUrl) != "${null}">
                                                            <img src="${re.contextPath}/plugin/common/images/close.png"
                                                                 style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                                 data-type="551" data-id="cert-img${cert_index}"
                                                                 onclick="deleteImg('${cert.imgUrl}', 1, this)"/>
                                                            <img class="layui-upload-img zz_img cursor cursor"
                                                                 id="cert-img${cert_index}" height="100" width="150"
                                                                 src="${cert.imgUrl}" onclick="showImg(this)">
                                                        <#else>
                                                            <img src="${re.contextPath}/plugin/common/images/close.png"
                                                                 id="delcert-img${cert_index}"
                                                                 style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                                 data-type="551" data-id="cert-img${cert_index}"
                                                                 onclick="deleteImg('', 2, this)"/>
                                                            <img class="layui-upload-img zz_img"
                                                                 id="cert-img${cert_index}" height="100" width="150"
                                                                 style="display:none" onclick="showImg(this)">
                                                        </#if>
                                                        <p id="demoText"></p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </#list>
                            <!--一个资质证明结束-->
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md1 layui-col-md-offset11">
                                <input type="button" class="layui-btn layui-btn-normal" ind="0" value="保存"
                                       onclick="saveCerts()">
                            </div>
                        </div>
                        <div class="layui-row" <#if (shenhe == '1')>style="display: none"</#if>>
                            <div class="col-md-2 layui-col-md-offset5 bluebg cursor"
                                 style="display: inline-block; width: 200px; padding: 0 20px; height: 50px; line-height: 50px;border-radius: 3px"
                                 onclick="addCertificate()">
                                <img src="${re.contextPath}/plugin/common/images/add-white.png"
                                     alt=""
                                     style="width:30px; margin: 10px;">
                                <span class="white ml10">添加资质证明</span>
                            </div>
                        </div>
                    </div>
                    <!--资质证明结束-->

                    <#if (shenhe == '1')>
                        <div class="layui-row">
                            <div class="layui-col-md1 layui-col-md-offset5">
                                <input class="layui-btn layui-btn-normal ashow" type="button" value="审核通过"
                                       onclick="pass()">
                            </div>
                            <div class="layui-col-md1">
                                <input class="layui-btn layui-btn-danger ashow" type="button" value="审核拒绝"
                                       onclick="noPass()">
                            </div>
                        </div>
                    </#if>
                </div>
                <div class="layui-tab-item ">
                    <div class="myDatatTop whitebg" style="padding: 20px 5%;">
                        <form action="" class="layui-form" enctype="multipart/form-data">
                            <div class="myDataCentere"
                                 style="margin-top: 0px;margin-left: 0px;  margin-bottom: 20px; width: 96%;">
                                <div class="set mt50">
                                    <div class="clearfix">
                                        <label class="fl mt10">项目显示标签个数</label>
                                        <input type="text" name="numTag" id="numTag" lay-verify="numTag" type="password"
                                               class="fl ml10" value="${user.numTag}"
                                               onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
                                               onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}">
                                        <input type="hidden" name="id" value="${user.id}">
                                        <input type="hidden" name="username" id="username" value="${user.username}">
                                        <span class="fl mt10 ml10">个</span>
                                    </div>
                                    <ul class="clearfix">
                                        <li class="clearfix">
                                            <div class="fl">
                                                <div>电子签章</div>
                                                <div class="dzbor" style="position: relative;float:left;">
                                                    <#if "${file}" !="${null}" && (file.dzqz) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="202" data-id="img1"
                                                             onclick="deleteImg('${file.dzqz}', 1, this)"/>
                                                        <img class="layui-upload-img" id="img1"
                                                             src="${file.dzqz+'?v=123'}">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="202" data-id="img1"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img class="layui-upload-img" id="img1" style="display:none">
                                                    </#if>
                                                </div>
                                            </div>
                                            <div class="fr mt50">
                                                <div class="pink">建议：100KB</div>
                                                <div class="pink">要求：白背景</div>
                                                <button type="button" lay-data="{type: '202',imgid:'img1'}"
                                                        class="blue mt60 gr_upload">点击上传
                                                </button>
                                            </div>
                                        </li>
                                        <li class="clearfix">
                                            <div class="fl">
                                                <div>电子签名</div>
                                                <div class="dzbor"
                                                     style="height: 150px!important;position: relative;float:left;">
                                                    <#if "${file}" !="${null}" && (file.dzqm) != "${null}">
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="203" data-id="img2"
                                                             onclick="deleteImg('${file.dzqm}', 1, this)"/>
                                                        <img class="layui-upload-img" id="img2" src="${file.dzqm}"
                                                             style="height: 150px">
                                                    <#else>
                                                        <img src="${re.contextPath}/plugin/common/images/close.png"
                                                             style="display: none;width: 30px;height: 30px;position: absolute;right: 0;top: 0;cursor:pointer;"
                                                             data-type="203" data-id="img2"
                                                             onclick="deleteImg('', 2, this)"/>
                                                        <img class="layui-upload-img" id="img2"
                                                             style="display:none;height: 150px">
                                                    </#if>
                                                </div>
                                            </div>
                                            <div class="fr mt50">
                                                <div class="pink">建议：100KB</div>
                                                <div class="pink">要求：白背景</div>
                                                <div class="pink">长宽比例：3:2</div>
                                                <button type="button" lay-data="{type: '203',imgid:'img2'}"
                                                        class="blue mt80 gr_upload">点击上传
                                                </button>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                                <div class="myDataBtn center">
                                    <button class="bluebg white bor0" lay-filter="submitNum" lay-submit type="button">
                                        保存
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="myDatatTop whitebg">
                        <form class="layui-form" method="post">
                            <div class="modify mt50">
                                <ul>
                                    <li class="clearfix">
                                        <label class="fl ta_right">用户名</label>
                                        <span class="ml20">${user.username}</span>
                                        <input type="hidden" name="id" value="${user.id}">
                                    </li>
                                    <li class="clearfix" style="margin-top:30px">
                                        <label class="fl ta_right pt8">原始密码</label>
                                        <input name="pass" id="pass" type="password" class="fl ml20 w30p"
                                               lay-verify="pass" placeholder="请输入原始密码">
                                    </li>
                                    <li class="clearfix" style="margin-top:30px">
                                        <label class="fl ta_right pt8">新密码</label>
                                        <input name="newPwd1" id="newPwd1" type="password" lay-verify="newPwd1"
                                               class="fl ml20 w30p" placeholder="请输入新密码">
                                        <span class="fl w40p ml10 password_explain">密码最少为8位,且至少包含大写字母、小写字母、数字、特殊字符(~!@#$%^&*)中的三种</span>
                                    </li>
                                    <li class="clearfix" style="margin-top:30px">
                                        <label class="fl ta_right pt8">确认密码</label>
                                        <input name="newPwd" id="newPwd" type="password" class="fl ml20 w30p"
                                               lay-verify="newPwd" placeholder="请再次输入新密码">
                                    </li>
                                </ul>
                                <div class="myDataBtn center">
                                    <button class="bluebg white bor0" lay-filter="submitPwd" lay-submit type="button">
                                        保存
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="myDatatTop whitebg" style="padding:50px;">
                        <table id="envtable" lay-filter="envtable"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--JQ-->

<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/cardUtils.js"></script>
<script type="text/html" id="barDemo">
    <#--    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
    <a class="layui-btn layui-btn-danger layui-btn-xs" <#if (shenhe != '1')>lay-event="del"</#if>>删除</a>
</script>
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <input class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="add" value="添加">
    </div>
</script>
<script>
    var work_history = 0, deledWorkExIds = [], deledProjectIds = [], showDelMsg = true;
</script>
<script type="text/html" id="envdetail">
    <span class="dodgerblue cursor" spid="{{d.spId}}" onclick="seeEnvDetail(this)">查看详情</span>
</script>
<script type="text/html" id="tabelArea">
    <select name="supArea" class="sel_xlk" lay-filter="hyselect{{d.suwInd}}" lay-verify="required" value="{{d.supArea}}"
            data-value="{{d.supArea}}" data-suwInd="{{d.suwInd}}" data-tableind="{{d.tableInd}}">
        <#list areaList as area>
            <#if area.badtCode==d.supArea>
                <option value="${area.badtCode}" selected>${area.badtName}</option>
            <#else>
                <option value="${area.badtCode}">${area.badtName}</option>
            </#if>
        </#list>
    </select>
</script>
<script type="text/html" id="tabelRole">
    <select name="supRole" class="sel_xlk" lay-filter="roleselect{{d.suwInd}}" lay-verify="required"
            value="{{d.supRole}}" data-value="{{d.supRole}}" data-suwInd="{{d.suwInd}}" data-tableind="{{d.tableInd}}">
        <#list xmjsList as area>
            <#if area.badtCode==d.supRole>
                <option value="${area.badtCode}" selected>${area.badtName}</option>
            <#else>
                <option value="${area.badtCode}">${area.badtName}</option>
            </#if>
        </#list>
    </select>
</script>
<script>
    var layer, element, form, laydate, table;
    var shenhe = '${shenhe}';
    var shenheinguserid = '${shenheinguserid}';
    $(function () {
        if (shenhe) {
            $('input:not(.gr_upload):not(.ashow)[type="button"]').hide();
            $('button:not(.gr_upload)').hide();
            $('input:not(.ashow)').attr('disabled', 'disabled');
            $('select').attr('disabled', 'disabled');
            $('textarea').attr('disabled', 'disabled');
            setTimeout(function () {
                $('input:not(.gr_upload):not(.ashow)[type="button"]').hide();
                $('button:not(.gr_upload)').hide();
                $('input:not(.ashow)').attr('disabled', 'disabled');
                $('select').attr('disabled', 'disabled');
                $('.upCard').css('cursor', 'default');
                $('button').css('cursor', 'default');
                $('a').css('cursor', 'default');
            }, 2000);
        }
        layui.use(['form', 'layer', 'laydate', 'element', 'table'], function () {
            form = layui.form, layer = layui.layer, laydate = layui.laydate, element = layui.element, table = layui.table;
            $.each($('.certificate_getDate'), function (ind, e) {
                var theId = $(e).attr('id');
                if (theId) {
                    laydate.render({
                        elem: '#' + theId
                    })
                }
            })
            form.verify({
                maxlength: function (v, item) {
                    var maxlength = item.getAttribute('lay-maxlength');
                    if (v.trim() != '') {
                        if (v.trim().length > maxlength) {
                            return "输入长度不能大于" + maxlength + "个字符！";
                        }
                    }
                },
                realName: function (v) {
                    if (v.trim() == '') {
                        return "真实姓名不能为空";
                    }
                }, cardId: function (v) {
                    if (v.trim() == '') {
                        var flag = validateIdCard(v.trim());
                        if (flag) {
                            return flag;
                        }
                    }
                }, sex: function (v) {
                    if (v.trim() == '') {
                        return '性别不能为空';
                    }
                }, education: function (v) {
                    if (v.trim() == '') {
                        return '学历不能为空';
                    }
                }, email: function (v) {
                    if (v.trim() != '') {
                        var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                        var flag = reg.test(v.trim());
                        if (!flag) {
                            return '邮箱格式输入有误';
                        }
                    }
                }
                , province: function (v) {
                    if (v.trim() == '') {
                        return '省不能为空';
                    }
                }, city: function (v) {
                    if (v.trim() == '') {
                        return '市不能为空';
                    }
                }, phoneNumber: function (v) {
                    if (v.trim() == '') {
                        return '手机号不能为空';
                    } else {
                        if (!v.trim().isMobile() && !v.trim().isTel()) {
                            return '请输入正确的手机号码或电话号码\n\n例如:13916752109或0531-3614072';
                        }
                    }
                }, pass: function (v) {
                    if (v.trim() == '') {
                        return '原密码不能为空';

                    }
                },
                newPwd1: function (v) {
                    if (v.trim() == '') {
                        return '新密码不能为空';
                    }
                    var result = '';
                    $.ajax({
                        url: '/sys/register/checkpwd',
                        data: {pwd: v.trim()},
                        type: 'GET',
                        cache: false,
                        async: false,
                        success: function (res) {
                            if (!res.flag) {
                                result = '密码格式输入有误';
                            }
                        }
                    })
                    return result;
                }, newPwd: function (v) {
                    if (v.trim() == '') {
                        return '确认密码不能为空';
                    }
                    var newPwd1 = $("#newPwd1").val().trim();
                    if (v.trim() != newPwd1) {
                        return '两次密码不一致';
                    }
                }, numTag: function (v) {
                    if (v.trim() == '') {
                        return "标签个数不能为空";
                    }
                }, school: function (v) {
                    if (v.trim() == '') {
                        return "毕业院校不能为空";
                    }
                }, major: function (v) {
                    if (v.trim() == '') {
                        return "专业不能为空";
                    }
                }, doBest: function (v, item) {
                    let check = false;
                    let parent = item.children;
                    let children = [];
                    for (let i = 0; i < parent.length; i++) {
                        children.push(parent[i].children[0]);
                    }

                    for (let i = 0; i < children.length; i++) {
                        if (children[i].checked) {
                            check = true;
                        }
                    }

                    if (!check) {
                        console.log(1)
                        return '擅长领域为必选项'
                    }
                }
            });
            //出生年月日：
            laydate.render({
                elem: '#birthday'
            });
            //加入(党、团)时间
            laydate.render({
                elem: '#joinPoliticalTime'
            })
            //第一学历时间
            laydate.render({
                elem: '#firstEducationTime'
            })
            //最终学历时间
            laydate.render({
                elem: '#lastEducationTime'
            })
            //参加工作时间
            laydate.render({
                elem: '#goWorkInput'
            })
            //到达公司时间
            laydate.render({
                elem: '#arrivalCompanyInput'
            })
            laydate.render({
                elem: '#arrival_dept_time'
            })
            //监听提交
            //监听提交
            form.on('submit(submitUser)', function (data) {
                var doBest = "";
                var doBestCheckboxes = $('input[name="doBest"]');
                $.each(doBestCheckboxes, function () {
                    var checked = $(this).prop("checked");
                    if (checked) {
                        var value = $(this).attr("value");
                        if (doBest == "") {
                            doBest = doBest + value;
                        } else {
                            doBest = doBest + "," + value;
                        }
                    }
                })
                data.field.doBest = doBest;
                //技术特长：
                data.field.techSpecial = $("#techSpecial").val();
                data.field.otherSpecial = $("#otherSpecial").val();
                //添加用户工作经历/项目经历：
                // setWorkExJson(data);

                console.log(data.field);
                layerAjax('/sys/personCenter/updateUsers', data.field, '', function (d) {
                    if (d.flag == true) {
                        layer.msg("已提交，请耐心等待管理员审核", {icon: 1});
                        flushAuditStatus();
                        // location.reload();
                    } else {
                        layer.msg(d.msg, {icon: 2});
                    }
                });
                return false;
            });

            form.on('submit(submitNum)', function (data) {
                layerAjax('/sys/personCenter/updateNum', data.field, '', function (d) {
                    if (d.flag == true) {
                        layer.msg(d.msg, {icon: 1});
                    } else {
                        layer.msg(d.msg, {icon: 2});
                    }
                });
                return false;
            });

            form.on('submit(submitPwd)', function (data) {
                layerAjax('/sys/personCenter/rePass', data.field, '', function (d) {
                    if (d.flag == true) {
                        layer.msg(d.msg, {icon: 1});
                        $("#pass").val('');
                        $("#newPwd1").val('');
                        $("#newPwd").val('');
                    } else {
                        layer.msg(d.msg, {icon: 2});
                    }
                });
                return false;
            });
            form.render();

            laydate.render({
                elem: '#work_start_0'
            });
            laydate.render({
                elem: '#work_end_0'
            });
            laydate.render({
                elem: '#cert_getDate_input0'
            });

            /*--------------------选择省获取市-----------------------------------------*/
            form.on('select(province)', function (data) {
                var code = data.value;
                if (code == "") {
                    return;
                }
                /*     var  code =code.replace(",","")*/
                $.ajax({
                    cache: true,
                    type: "get",
                    url: "getCity",
                    data: {"code": code},
                    success: function (data) {
                        $("#city").empty();
                        /*    $("#city").append("<option value=''>选择市</option>");*/
                        for (var i = 0; i < data.length; i++) {
                            $("#city").append("<option value='" + data[i].code + "'>" + data[i].name + "</option>");
                        }
                        layui.form.render("select")
                    }, error: function (error) {
                        return;
                    }
                })
            });


            //评分表格：
            table.render({
                elem: '#envtable'
                // ,height: 'full-200'
                , url: '/supervisor/projectManager/tagList' //数据接口
                , page: true//开启分页
                , height: 'full-200'
                , cols: [[ //表头
                    {field: 'spId', hide: true}
                    , {field: 'speTarget', hide: true}
                    , {
                        field: '', title: '序号', align: 'center', width: '11%', templet: function (res) {
                            return res.LAY_INDEX;
                        }
                    }
                    , {field: 'spName', align: 'center', width: '30%', title: '项目名称'}
                    , {field: 'score', align: 'center', width: '30%', title: '项目总平均分'}
                    , {field: 'action', align: 'center', width: '20%', title: '操作', templet: '#envdetail'}
                ]],
                parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.msg,
                        "count": res.count,
                        "data": res.data
                    }
                }
            });

            $("input").blur(function () {
                if ($(this).val().length > 50) {
                    var newVal = $(this).val().substr(0, 50);
                    $($(this).val(newVal));
                    layer.msg("输入长度不能大于50", {icon: 5, anim: 6, offset: 'c'});
                }
            })


        });


        setTimeout(function () {
            var workListJson = '${workList}';
            if (workListJson) {
                var workList = JSON.parse(workListJson);
                if (workList.length > 0) {
                    showDelMsg = false;
                    $("#delWorkImg_0").click();

                    if (workList.length > 0) {
                        addHisFu(workList, 0, workList.length);
                    }
                }
            } else {
                var edata = {};
                addHis(edata);
            }
        }, 1000)

        flushStudy();
        flushTrain();

    });

    var jsondata = {
        type: '101'
    }
    var _imgid = 'img';
    layui.use('upload', function () {
        var upload = layui.upload;
        //执行实例
        upload.render({
            elem: '.gr_upload',//绑定元素
            url: '/sys/personCenter/uploadFile',//上传接口
            data: jsondata,
            acceptMime: 'image/*',
            before: function (obj) {
                var files = this.files = obj.pushFile();
                var fileName;
                var i = 0;
                var j = 0;
                for (var key in files) {
                    i++;
                    fileName = files[key].name; //针对一个文件直接赋值就可以了
                }
                var ext = fileName.substr(fileName.lastIndexOf('.') + 1);//获得后缀
                jsondata.type = this.type;
                _imgid = this.imgid;
                if ('551' == jsondata.type) {
                    var aCertOut = $('#' + _imgid).parents('.a_cert_history');
                    var certId = aCertOut.find('.cert_id_input').val();
                    if (!certId) {
                        certId = $('#' + _imgid).attr('certid');
                    }
                    if (certId) {
                        jsondata.ids = certId;
                    } else {
                        delete jsondata.ids;
                    }
                } else if ('555' == jsondata.type || '556' == jsondata.type || "557" == jsondata.type || '558' == jsondata.type) {
                    var suenId = $('input.' + _imgid).val();
                    if (!suenId) {
                        suenId = $('#' + _imgid).attr('certid');
                    }
                    if (suenId) {
                        jsondata.ids = suenId;
                    } else {
                        delete jsondata.ids;
                    }
                }
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result) {
                    $('#' + _imgid).attr('src', '');
                    $('#' + _imgid).show();
                    $('#del' + _imgid).show();
                    $('#' + _imgid).attr('src', result); //图片链接（base64）
                    if ('208' == jsondata.type) {
                        parent.changeLogo(result);
                    }
                });
            },
            done: function (res, index) {
                if (res.flag == true) {
                    // $('#'+_imgid).show().attr('src', '');
                    // $('#'+_imgid).show().attr('src', res.data);
                    if (res.josnObj) {
                        var json = res.josnObj.words_result;
                        if (json) {
                            var ToStr = JSON.stringify(json);
                            if ($('#jgcode').val() != JSON.stringify(ToStr).substr(26, 18)) {
                                //提示营业执照不匹配,请重新上传
                                layer.msg("营业执照不匹配,请重新上传!", {icon: 2});
                                delete this.files[index];
                                return;
                            }
                        }
                        var certId = res.josnObj.certId;
                        if (certId) {
                            $('#' + _imgid).show().attr('certid', certId);
                            if ("555" == jsondata.type || '556' == jsondata.type || "557" == jsondata.type || '558' == jsondata.type) {
                                if (!$('input.' + _imgid).val()) {
                                    $('input.' + _imgid).val(certId);
                                }
                            }
                        }
                    }
                    layer.msg("上传成功", {icon: 1});
                } else {
                    layer.msg('上传失败' + res.msg, {icon: 2});
                }
                delete this.files[index];
            },
            error: function () {
                //请求异常回调
                var demoText = $('#demoText');
                layer.msg('上传失败');
            }
        });
    })
    String.prototype.Trim = function () {
        var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);
        return (m == null) ? "" : m[1];
    };
    String.prototype.isMobile = function () {
        return (/^1[3|4|5|7|8|9][0-9]\d{4,8}$/.test(this.Trim()));
    };
    String.prototype.isTel = function () {
        //"兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)"
        //return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
        return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
    }

    function addHisFu(data, ind, len) {
        if (ind < len) {
            addHis(data[ind]);
            ind++;
            addHisFu(data, ind, len);
        }
    }

    function validateIdCard(value) {

        if (typeof value == 'undefined' || !value || value == '') {
            return "身份证号码为空!";
        }
        if (value.length != 15 && value.length != 18) {
            return '身份证号码长度应该为15位或者18位!';
        }
        var patten1 = "^\\d{15}$";
        var patten2 = "^\\d{17}[0123456789Xx]$";
        if (!new RegExp(patten1, "g").test(value) && !new RegExp(patten2, "g").test(value)) {
            return '身份证号码只能包含数字和X';
        }

        var id18 = idCardTo18(value);
        if (value.length == 15) {
            value = id18;
        }
        var csrqstr = id18.substr(6, 8);
        var year = parseInt(csrqstr.substr(0, 4), 10);
        var month = parseInt(csrqstr.substr(4, 2), 10) - 1;
        var date = parseInt(csrqstr.substr(6, 2), 10);
        var csrq = new Date(year, month, date);
        if (year != csrq.getFullYear() || month != csrq.getMonth() || date != csrq.getDate()) {
            return '身份证中的出生日期[' + csrqstr + ']非法!';
        }
        if (value != id18) {
            return "身份证不正确，正确的身份证号码为:[" + id18 + "]";
        }
        return "";
    }


    function delCert(e) {
        layer.confirm('确定删除?', function (index) {
            var out = $(e).parents('.a_cert_history');
            var certId = out.find('.cert_id_input').val();
            if (!certId) {
                certId = out.find('.zz_img').attr('certid');
            }
            if (certId) {
                $.ajax({
                    url: '/sys/personCenter/delCert',
                    data: {sucId: certId},
                    type: 'post',
                    dataType: 'json',
                    success: function (res) {
                        if (!res.flag) {
                            layer.msg(res.msg, {icon: 5, anim: 6, offset: 'c'});
                        } else {
                            out.remove();
                            layer.msg("操作成功", {icon: 1});
                        }
                    }
                })
            } else {
                out.remove();
            }

            layer.close(index);
        });
    }

    function inputBlur(e) {
        if ($(e).val().length > 50) {
            var newVal = $(e).val().substr(0, 50);
            $(e).val(newVal);
            layer.msg("输入长度不能大于50", {icon: 5, anim: 6, offset: 'c'});
        }
    }

    function delHis(e, msg) {
        if (showDelMsg) {
            layer.confirm('确定删除?', function (index) {
                delHisAction(e);
                layer.close(index);
            });
        } else {
            delHisAction(e)
        }
        showDelMsg = true;
    }

    function cityChange(object) {
        var code = $(object).find('option:selected').val();
        if (code == "") {
            return;
        }
        layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
            if (d.flag == true) {
                $(object).next().empty().append("<option value=''>选择区县</option>");
                for (var i = 0; i < d.data.length; i++) {
                    $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                }
            } else {
                layer.msg(d.msg, {icon: 2});
            }
        });

    }

    function provinceChange(object) {
        var code = $(object).find('option:selected').val();
        if (code == "") {
            return;
        }
        layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
            if (d.flag == true) {
                $(object).next().empty().append("<option value=''>选择市</option>");
                for (var i = 0; i < d.data.length; i++) {
                    $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                }
            } else {
                layer.msg(d.msg, {icon: 2});
            }
        });
    }

    function addPlace(object) {
        $(object).parent().after(" <div class=\"layui-col-sm8 divplaceselect\" style=\"float: right;margin-top: 5px;\">\n" +
            "                            <select name=\"projectPlacedtos[1].province\" class=\"ml8 fl\" id=\"placeprovince1\"   onchange=\"provinceChange(this)\"  style=\"width:90px !important;\"\n" +
            "                                    lay-verify=\"required\" lay-ignore>\n" +
            "                                <option value=\"\">请选择</option>\n" +
            "                                <#list provincelist as vo>\n" +
            "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
            "                                </#list>\n" +
            "                            </select>\n" +
            "                            <select name=\"projectPlacedtos[1].city\" id=\"placecity1\" class=\"ml8 fl\"  onchange=\"cityChange(this)\" lay-filter=\"projectPlacedtos[1].city\" lay-verify=\"required\"\n" +
            "                                    style=\"width: 90px !important;margin-left: 10px\" lay-ignore>\n" +
            "                                <option value=\"\">请选择</option>\n" +
            "                            </select>\n" +
            "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml10 addplaceimage\" style=\"width: 28px;\" onclick=\"addPlace(this)\" >\n" +
            "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml10\"  style=\"width: 28px;\" onclick=\"deletePlace(this)\">\n" +
            "                        </div>");
        resetPlace();

    }

    function resetPlace() {
        $(".ssplace").find(".divplaceselect").each(function (i, v) {
            $(v).find("select:eq(0)").attr("name", "projectPlacedtos[" + i + "].province")
            $(v).find("select:eq(1)").attr("name", "projectPlacedtos[" + i + "].city");
            $(v).find("select:eq(2)").attr("name", "projectPlacedtos[" + i + "].county");
            $(v).find("select:eq(0)").attr("lay-filter", "projectPlacedtos[" + i + "].province");
            $(v).find("select:eq(1)").attr("lay-filter", "projectPlacedtos[" + i + "].city");
            $(v).find("select:eq(2)").attr("lay-filter", "projectPlacedtos[" + i + "].county");
        });
    }

    function deletePlace(object) {
        var placeLength = $(".ssplace").find(".divplaceselect").length;
        console.log($(".ssplace").find(".divplaceselect"));
        console.log(placeLength);
        if (placeLength == 1) {
            layer.msg("负责地区不能全部删除", {icon: 2});
        } else {
            $(object).parent().remove();
            resetPlace();
        }

    }

    function delHisAction(e) {
        var ind = $(e).attr('ind');
        var suweId = $("#work_history_suweid_" + ind).val();
        if (suweId) {
            $.ajax({
                url: '/workEx/delete',
                data: {suweId: suweId},
                type: 'post',
                dataType: 'json',
                success: function (res) {
                    if (res && res.flag) {
                        layer.msg("操作成功", {icon: 1});
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
            // deledWorkExIds.push(suweId);
        }
        $(e).parents('.a_history').remove();
        //如果页面上已经没有了经历,那么直接去后台删除:
        if ($(".a_history").length == 0) {
            clearWork();
        }
    }


    function addCertificate() {
        var newCertId = getId();
        var newImgId = newCertId;
        var delImg = '';
        if (shenhe != '1') {
            delImg = '                                            <img src="${re.contextPath}/plugin/common/images/del.png"\n' +
                '                                                 onclick="delCert(this)" alt="" class="fr cursor" ind="0"\n' +
                '                                                 style="width:32px">\n';
        }
        $("#certificate_history").append('<div class="a_cert_history">\n' +
            '                            <input type="hidden" value="' + newCertId + '" class="cert_id_input">\n' +
            '                            <div>\n' +
            '                                <div class="certificate_history_out a_history_head layui-row certificate_history_0 layui-form-item">\n' +
            '                                    <div class="layui-inline  layui-col-md3 ">\n' +
            '                                        <label class="layui-form-label layui-col-md4" style="padding:9px 5px 9px 0px">获得时间</label>\n' +
            '                                        <div class="layui-col-md7 ml10">\n' +
            '                                            <input id="cert_getDate_input' + newImgId + '" type="text" name="getDate" lay-verify="date" placeholder="获得时间" autocomplete="off" class="layui-input w100p certificate_getDate">\n' +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                    <div class="layui-inline layui-col-md3">\n' +
            '                                        <label class="layui-form-label">证书名称</label>\n' +
            '                                        <div class="layui-input-block">\n' +
            '                                            <select class="w90p certificateName">\n' +
            '                                                <#list certNameList as vo>\n' +
            '                                                        <option value="${vo.badtCode}">${vo.badtName}</option>\n' +
            '                                                </#list>\n' +
            '                                            </select>\n' +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                    <div class="layui-inline layui-col-md3 w20p">\n' +
            '                                        <label class="layui-form-label">证书级别</label>\n' +
            '                                        <div class="layui-input-block">\n' +
            '                                            <select class="w90p certificateLevel">\n' +
            '                                                <#list certLevelList as vo>\n' +
            '                                                    <option value="${vo.badtCode}">${vo.badtName}</option>\n' +
            '                                                </#list>\n' +
            '                                            </select>\n' +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                    <div class="layui-inline layui-col-md3 w20p">\n' +
            '                                        <label class="layui-form-label">发证机关</label>\n' +
            '                                        <div class="layui-input-block">\n' +
            '                                            <input type="text" lay-verify="title" autocomplete="off" placeholder="请输入发证机关" class="layui-input issuingOrg">\n' +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                    <div class="layui-inline w10p">\n' +
            '                                        <div class="layui-col-md2 layui-col-md-offset3 imgUrl">\n' +
            delImg +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                </div>\n' +
            '                                <div class="layui-row">\n' +
            '                                    <div class="layui-col-md12">\n' +
            '                                        <label class="layui-form-label layui-col-md4" style="padding:9px 5px 9px 0px">证书图片</label>\n' +
            '                                        <div class="fl clearfix mt20 layui-col-md8">\n' +
            '                                                <label>\n' +
            '                                                    <div class="fl clearfix" style="margin-right: 20px;">\n' +
            '                                                        <div id="zz_div" class="upCard fl ml20">\n' +
            '                                                            <img src="${re.contextPath}/plugin/common/images/57@2x.png" alt="">\n' +
            '                                                            <button type="button" id="upload-' + newImgId + '" lay-data="{type: \'551\',imgid:\'cert-img' + newImgId + '\'}"  class="gr_upload whitebutton ml0 pl10 w125 h10"  style="padding-left:25px">证书图片</button>\n' +
            '                                                        </div>\n' +
            '                                                    </div>\n' +
            '                                                </label>\n' +
            '                                                <div>\n' +

            '                                                        <img class="layui-upload-img zz_img" id="cert-img' + newImgId + '" height="100" width="150" style="display:none">\n' +

            '                                                    <p id="demoText"></p>\n' +
            '                                                </div>\n' +
            '                                        </div>\n' +
            '                                    </div>\n' +
            '                                </div>\n' +
            // '                                <div class="layui-row">\n' +
            // '                                    <div class="layui-col-md1 layui-col-md-offset11">\n' +
            // '                                        <input type="button" class="layui-btn layui-btn-normal" ind="0" value="保存" onclick="saveCertificate(this)">\n' +
            // '                                    </div>\n' +
            // '                                </div>\n' +
            '                            </div>\n' +
            '                        </div>');

        laydate.render({
            elem: '#cert_getDate_input' + newImgId
        });

        var jsondata = {
            type: '551'
        }
        layui.upload.render({
            elem: '#upload-' + newImgId,//绑定元素
            url: '/sys/personCenter/uploadFile',//上传接口
            data: jsondata,
            accept: 'file',
            before: function (obj) {
                var files = this.files = obj.pushFile();
                _imgid = this.imgid;
                var aCertOut = $('#' + _imgid).parents('.a_cert_history');
                var certId = aCertOut.find('.cert_id_input').val();
                if (!certId) {
                    certId = $('#' + _imgid).attr('certid');
                }
                if (certId) {
                    jsondata.ids = certId;
                } else {
                    delete jsondata.ids;
                }
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result) {
                    $('#' + _imgid).attr('src', '');
                    $('#' + _imgid).show();
                    $('#' + _imgid).attr('src', result); //图片链接（base64）
                });
            },
            done: function (res, index) {
                if (res.flag == true) {
                    if (res.josnObj) {
                        var certId = res.josnObj.certId;
                        if (certId) {
                            $('#' + _imgid).show().attr('certid', certId);
                        }
                    }
                    // $('#'+_imgid).show().attr('src', '');
                    // $('#'+_imgid).show().attr('src', res.data);
                    layer.msg("上传成功", {icon: 1});
                } else {
                    layer.msg('上传失败' + res.msg);
                }
                delete this.files[index];
            },
            error: function () {
                //请求异常回调
                var demoText = $('#demoText');
                layer.msg('上传失败');
            }
        });
    }

    function addHis(data) {
        //一个工作的下标
        showDelMsg = true;
        var newIndex = 0;
        var suweId = '';
        var startDate = '';
        var endDate = '';
        var workUnit = '';
        var station = '';
        var duty = '';
        var suwInd = '';
        var tableData = [];
        if (data) {
            if (data.suwInd) {
                newIndex = data.suwInd;
                suwInd = data.suwInd;
            } else {
                suwInd = newIndex;
                data.suwInd = suwInd;
            }
            if (data.suweId) {
                suweId = data.suweId;
            } else {
                suweId = getId();
            }
            if (data.startDate) {
                startDate = data.startDate.substring(0, 10);
            }
            if (data.endDate) {
                endDate = data.endDate.substring(0, 10);
            }
            if (data.workUnit) {
                workUnit = data.workUnit;
            }
            if (data.station) {
                station = data.station;
            }
            if (data.duty) {
                duty = data.duty;
            }
            if (data.userProjectList) {
                for (var t = 0; t < data.userProjectList.length; t++) {
                    //更改project的suweId属性:(如果没有值,设置为newIndex)
                    var suwIndOfProj = data.userProjectList[t].suwInd;
                    if (!suwIndOfProj) {
                        data.userProjectList[t].suwInd = suwInd;
                    }
                }
                tableData = data.userProjectList;
            }
        } else {
            var historys = $('.a_history');
            if (historys) {
                newIndex = historys.length;
            }
            suwInd = newIndex;
        }
        var aHisDelImg = '';
        var addXmjlImg = '';
        if (shenhe != '1') {
            aHisDelImg = '                                                <img src="${re.contextPath}/plugin/common/images/del.png" id="delWorkImg_' + newIndex + '" \n' +
                '                                                     onclick="delHis(this)" alt="" class="fr cursor" ind="' + newIndex + '"\n' +
                '                                                     style="width:32px">\n';
            addXmjlImg = '                                        <img src="${re.contextPath}/plugin/common/images/add.png"\n' +
                '                                             onclick="addOneEmptyLine(\'historytable' + newIndex + '\')" alt="" class="cursor"\n' +
                '                                             style="width:32px">\n' +
                '                                        <span>添加项目经历</span>\n';
        }
        $("#work_pro_history").append('<div class="history_out_' + newIndex + ' a_history">\n' +
            '                                <div id="work_history_out_' + newIndex + ' work_history_out" >\n' +
            '                                    <input id="work_history_suweid_' + newIndex + '" type="hidden" name="suweId" suwind="' + suwInd + '" class="suweid" value="' + suweId + '">\n' +
            '                                    <div class="work_history_out a_history_head layui-row work_history_' + newIndex + ' layui-form-item">\n' +
            '                                        <div class="layui-inline  layui-col-md3 ">\n' +
            '                                            <label class="layui-form-label layui-col-md4" style="padding:9px 5px 9px 0px">选择时间</label>\n' +
            '                                            <div class="layui-col-md4">\n' +
            '                                                <input type="text" id="work_start_' + newIndex + '" name="startDate" lay-verify="date" placeholder="开始时间" autocomplete="off" class="layui-input" value="' + startDate + '">\n' +
            '                                            </div>\n' +
            '                                            <div class="layui-col-md4">\n' +
            '                                                <input type="text" id="work_end_' + newIndex + '" name="endDate" lay-verify="date" placeholder="结束时间" autocomplete="off" class="layui-input"  value="' + endDate + '">\n' +
            '                                            </div>\n' +
            '                                        </div>\n' +
            '                                        <div class="layui-inline layui-col-md3">\n' +
            '                                            <label class="layui-form-label">工作单位</label>\n' +
            '                                            <div class="layui-input-block">\n' +
            '                                                <input id="work_unit_' + newIndex + '" type="text" name="workUnit" lay-verify="title" autocomplete="off" placeholder="请输入工作单位" class="layui-input" value="' + workUnit + '" onBlur="inputBlur(this)">\n' +
            '                                            </div>\n' +
            '                                        </div>\n' +
            '                                        <div class="layui-inline layui-col-md3 w20p">\n' +
            '                                            <label class="layui-form-label">岗位</label>\n' +
            '                                            <div class="layui-input-block">\n' +
            '                                                <input id="work_gangwei_' + newIndex + '" type="text" name="station" lay-verify="title" autocomplete="off" placeholder="请输入岗位名称" class="layui-input"  value="' + station + '" onBlur="inputBlur(this)">\n' +
            '                                            </div>\n' +
            '                                        </div>\n' +
            '                                        <div class="layui-inline layui-col-md3 w20p">\n' +
            '                                            <label class="layui-form-label">职务</label>\n' +
            '                                            <div class="layui-input-block">\n' +
            '                                                <input id="work_zhiwu_' + newIndex + '" type="text" name="duty" lay-verify="title" autocomplete="off" placeholder="请输入职务" class="layui-input" value="' + duty + '" onBlur="inputBlur(this)">\n' +
            '                                            </div>\n' +
            '                                        </div>\n' +
            '                                        <div class="layui-inline w10p">\n' +
            '                                            <div class="layui-col-md2 layui-col-md-offset3">\n' +
            aHisDelImg +
            '                                            </div>\n' +
            '                                        </div>\n' +
            '                                </div>\n' +
            '                                <div id="pro_history_out_' + newIndex + '" class="pro_history_out_' + newIndex + '">\n' +
            '                                    <div class="history_table_out_' + newIndex + ' layui-row">\n' +
            '                                        <table id="historytable' + newIndex + '" class="atable" lay-filter="historytable' + newIndex + '"></table>\n' +
            '                                    </div>\n' +
            '                                </div>\n' +
            '                                <div class="layui-row">\n' +
            '                                    <div class="layui-col-md2  layui-col-md-offset5">\n' +
            addXmjlImg +
            '                                    </div>\n' +
            '                                    <div class="layui-col-md1 layui-col-md-offset4">\n' +
            '                                        <input type="hidden" class="layui-btn layui-btn-normal work-save-btn" ind="' + newIndex + '" value="保存">\n' +
            '                                    </div>\n' +
            '                                </div>\n' +
            '                            </div>\n' +
            '                            <!--一个工作/项目经历结束-->\n' +
            '                        </div>');


        work_history = newIndex;
        laydate.render({
            elem: '#work_start_' + newIndex
        });
        laydate.render({
            elem: '#work_end_' + newIndex
        });
        table.render({
            elem: '#historytable' + newIndex,
            data: tableData,
            // url: '/workEx/projectList',
            // where: {
            //     suweId: $("#work_history_suweid_0").val()
            // },
            page: false,
            limit: Number.MAX_VALUE,
            cols: [[
                {field: 'suweId', hide: true},
                {field: 'suwInd', hide: true},
                {field: 'supId', hide: true},
                {field: 'supName', title: '项目名称', align: 'center' <#if (shenhe != '1')>, edit: 'text'</#if>},
                {field: 'supArea', title: '所属领域', align: 'center', templet: '#tabelArea'},
                {field: 'supTzMoney', title: '项目投资金额(万)', align: 'center'<#if (shenhe != '1')>, edit: 'text'</#if>},
                {field: 'supHtMoney', title: '服务合同金额(万)', align: 'center'<#if (shenhe != '1')>, edit: 'text'</#if>},
                {field: 'supRole', title: '项目中承担角色', align: 'center', templet: '#tabelRole'},
                {field: 'supRemark', title: '备注', align: 'center'<#if (shenhe != '1')>, edit: 'text'</#if>},
                {field: 'his_action', title: '操作', align: 'center', toolbar: '#barDemo'}
            ]],
            text: {
                none: '点击下方添加按钮添加项目' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            },
            done: function (res, currentCount, count) {
                //设置下拉框样式在表格之上 不会遮挡下拉框
                $(".layui-table-body").css('overflow', 'visible');
                $(".layui-table-box").css('overflow', 'visible');
                $(".layui-table-view").css('overflow', 'visible');
                var tableElem = this.elem.next('.layui-table-view');
                count || tableElem.find('.layui-table-header').css('overflow', 'auto');
                layui.each(tableElem.find('select[name="supArea"]'), function (index, item) {
                    var elem = $(item);
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('overflow', 'visible');
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('height', '100%');
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('padding', '0px');
                    elem.val(elem.data('state')).parents('td').css("padding", "0px");
                    // elem.val("交警");
                    // form.render(item);
                    elem.next().find('input').val(table.cache['historytable' + newIndex][index].supArea);
                    elem.next().find('dd').removeClass('layui-this');
                    elem.next().find('dd[lay-value="' + table.cache['historytable' + newIndex][index].supArea + '"]').click();
                    elem.next().find('input').attr('disabled', 'disabled');
                });

                layui.each(tableElem.find('select[name="supRole"]'), function (index, item) {
                    var elem = $(item);
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('overflow', 'visible');
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('height', '100%');
                    elem.val(elem.data('state')).parents('div.layui-table-cell').css('padding', '0px');
                    elem.val(elem.data('state')).parents('td').css("padding", "0px");
                    // elem.val("交警");
                    // form.render(item);
                    elem.next().find('input').val(table.cache['historytable' + newIndex][index].supRole);
                    elem.next().find('dd').removeClass('layui-this');
                    elem.next().find('dd[lay-value="' + table.cache['historytable' + newIndex][index].supRole + '"]').click();
                });

                if (shenhe != '1') {
                    form.on('select(hyselect' + suwInd + ')', function (data) {
                        var id = data.elem.dataset.value;
                        var suwInd = data.elem.dataset.suwind;
                        var tableind = data.elem.dataset.tableind;
                        var supAreaCode = data.elem.value;
                        if (tableind && supAreaCode) {
                            table.cache['historytable' + suwInd][tableind].supArea = supAreaCode;
                        }
                    });

                    form.on('select(roleselect' + suwInd + ')', function (data) {
                        var id = data.elem.dataset.value;
                        var tableind = data.elem.dataset.tableind;
                        var supAreaCode = data.elem.value;
                        if (tableind && supAreaCode) {
                            table.cache['historytable' + suwInd][tableind].supRole = supAreaCode;
                        }
                    });
                } else {
                    $('.layui-anim').remove();
                    $('.layui-anim-upbit').remove();
                    $('.layui-edge').remove();
                    $('.layui-unselect').css('cursor', 'default');
                    $('.layui-form-select').css('cursor', 'default');
                }
            }
        })

        table.on('edit(historytable' + newIndex + ')', function (obj) { //注：edit是固定事件名，test是table原始容器的属性 lay-filter="对应的值"
            //修改后的校验：

        });
        //监听事件
        table.on('toolbar(historytable' + newIndex + ')', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            switch (obj.event) {
                case 'add':
                    addOneEmptyLine('historytable' + newIndex);
                    break;
            }
            ;
        });

        table.on('tool(historytable' + newIndex + ')', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值（也可以是表头的 event 参数对应的值）
            var tr = obj.tr; //获得当前行 tr 的 DOM 对象（如果有的话）
            if (layEvent === 'del') { //删除
                layer.confirm('确定删除?', function (index) {
                    if (data.supId) {
                        // deledProjectIds.push(data.supId);
                        $.ajax({
                            url: '/workEx/deleteProj',
                            data: {supId: data.supId},
                            type: 'post',
                            dataType: 'json',
                            success: function (res) {
                                if (res.flag) {
                                    layer.msg('操作成功', {icon: 1});
                                } else {
                                    layer.msg(res.msg, {icon: 1});
                                }
                            }
                        })
                    }
                    obj.del(); //删除对应行（tr）的DOM结构，并更新缓存
                    layer.close(index);
                    //向服务端发送删除指令
                });
            }
        });
    }

    function addOneEmptyLine(laytable) {
        var oldData = table.cache[laytable];
        var data1 = {
            tableInd: table.cache[laytable].length
        };
        if (laytable.indexOf('historytable') != -1) {
            var suwInd = laytable.substr(laytable.indexOf('historytable') + 12);
            data1.suwInd = suwInd;
            table.cache[laytable].suwInd = suwInd;
        }
        oldData.push(data1);
        table.reload(laytable, {
            data: oldData
        });
        table.on('edit(' + laytable + ')', function (obj) {
            var selector = obj.tr.find('[data-field=' + obj.field + ']');
            var oldtext = $(selector).text();
            var field = obj.field;
            if (obj.field == 'supName' || obj.field == 'supRemark' || obj.field == 'supTzMoney' || obj.field == 'supHtMoney') {
                if (obj.value.length > 50) {
                    layer.msg("长度不得超过50", {icon: 5, anim: 6, offset: 'c'});
                    obj.tr.find('td[data-field=' + field + '] input').val(oldtext);
                    eval("obj.update({ " + field + ": oldtext })");
                }
            }
            if (obj.field == "supTzMoney" || obj.field == "supHtMoney") {
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$/;
                var flag = reg.test(obj.value);
                if (!flag) {
                    layer.msg("请输入正确的金额", {icon: 5, anim: 6, offset: 'c'});
                    obj.tr.find('td[data-field=' + field + '] input').val(oldtext);
                    eval("obj.update({ " + field + ": oldtext })");
                }
            }
        });
    }


    function delProj(e) {
        var thisRow = $(e).parents('tr')[0].rowIndex;
        cbList = table.cache["historytable"];
        for (var i = 0; i < cbList.length; i++) {
            var _id = cbList[i].LAY_TABLE_INDEX;
            if (_id == thisRow) {
                cbList.splice(i, 1);
                break;
            }
        }
        table.reload("historytable", {
            data: cbList,
        })
    }

    function setTableData(data) {
        var ind = 0;
        var tabledata = {};
        eval("tabledata.sysUserProjectList=[]");
        $.each($('.atable'), function (r, b) {
            var tablelay = $(b).attr('lay-filter');
            var wkid = $(b).attr("wkid");
            var cacheElement = table.cache[tablelay];
            if (cacheElement && cacheElement.length > 0) {
                for (var i = 0; i < cacheElement.length; i++) {
                    data.field['sysUserProjectList[' + ind + '].suwe_id'] = cacheElement[i].suweId;
                    data.field['sysUserProjectList[' + ind + '].supName'] = cacheElement[i].supNam;
                    eval("tabledata.sysUserProjectList[" + ind + "].supName=cacheElement[i].supName");
                    eval("tabledata.sysUserProjectList[" + ind + "].supArea=cacheElement[i].supArea");
                    eval("tabledata.sysUserProjectList[" + ind + "].supTzMoney=cacheElement[i].supTzMoney");
                    eval("tabledata.sysUserProjectList[" + ind + "].supHtMoney=cacheElement[i].supHtMoney");
                    eval("tabledata.sysUserProjectList[" + ind + "].supRole=cacheElement[i].supRole");
                    eval("tabledata.sysUserProjectList[" + ind + "].supRemark=cacheElement[i].supRemark");
                    ind++;
                }
            }
        })
    }

    function saveCertificate(e) {
        var sendData = {};
        var outDiv = $(e).parents('.a_cert_history');
        //获得时间
        var getDate = outDiv.find('.certificate_getDate').val();
        if (!getDate) {
            layer.msg("获得时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.getDate = getDate;
        //证书名称:
        var certName = outDiv.find('.certificateName').val();
        if (!certName) {
            layer.msg("证书名称不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.certificateName = certName;
        //证书级别:
        var certLevel = outDiv.find('.certificateLevel').val();
        sendData.certificateLevel = certLevel;
        //发证机关
        var issuingOrg = outDiv.find('.issuingOrg').val();
        if (!issuingOrg) {
            layer.msg("发证机关不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.issuingOrg = issuingOrg;
        //图片路径
        var certId = outDiv.find('.cert_id_input').val();
        if (!certId) {
            certId = outDiv.find('.zz_img').attr('certid');
        }
        if (certId) {
            sendData.sucId = certId;
        }
        $.ajax({
            url: '/sys/personCenter/addCert',
            data: JSON.stringify(sendData),
            contentType: "application/json;",
            type: 'post',
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    layer.msg("保存成功", {icon: 1});
                    flushAuditStatus();
                } else {
                    layer.msg(res.msg, {icon: 2});
                }
            }
        })
    }

    function saveCerts() {
        var certOutDivs = $('.a_cert_history');
        if (certOutDivs && certOutDivs.length > 0) {
            var sendDatas = [];
            for (var a = 0; a < certOutDivs.length; a++) {
                var outDiv = $(certOutDivs[a]);
                var sendData = {};
                //获得时间
                var getDate = outDiv.find('.certificate_getDate').val();
                if (!getDate) {
                    layer.msg("获得时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
                    return;
                }
                sendData.getDate = getDate;
                //证书名称:
                var certName = outDiv.find('.certificateName').val();
                if (!certName) {
                    layer.msg("证书名称不能为空!", {icon: 5, anim: 6, offset: 'c'});
                    return;
                }
                sendData.certificateName = certName;
                //证书级别:
                var certLevel = outDiv.find('.certificateLevel').val();
                sendData.certificateLevel = certLevel;
                //发证机关
                var issuingOrg = outDiv.find('.issuingOrg').val();
                if (!issuingOrg) {
                    layer.msg("发证机关不能为空!", {icon: 5, anim: 6, offset: 'c'});
                    return;
                }
                sendData.issuingOrg = issuingOrg;
                //图片路径
                var certId = outDiv.find('.cert_id_input').val();
                if (!certId) {
                    certId = outDiv.find('.zz_img').attr('certid');
                }
                if (certId) {
                    sendData.sucId = certId;
                }
                sendData.tableInd = a * 1 + 1;
                sendDatas.push(sendData);
            }

            $.ajax({
                url: '/sys/personCenter/addCertList',
                data: JSON.stringify(sendDatas),
                contentType: "application/json;",
                type: 'post',
                dataType: 'json',
                success: function (res) {
                    if (res.flag) {
                        layer.msg("保存成功", {icon: 1});
                        flushAuditStatus();
                    }
                }
            })
        }
    }

    function saveWork(e) {
        var sendData = {};
        var ind = $(e).attr('ind');
        sendData.suweId = $("#work_history_suweid_" + ind).val();
        sendData.suwInd = $("#work_history_suweid_" + ind).attr('suwind');
        sendData.startDate = $("#work_start_" + ind).val();
        if (!sendData.startDate) {
            layer.msg("开始时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.endDate = $("#work_end_" + ind).val();
        if (!sendData.endDate) {
            layer.msg("结束时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.workUnit = $("#work_unit_" + ind).val();
        if (!sendData.workUnit) {
            layer.msg("工作单位不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.station = $("#work_gangwei_" + ind).val();
        if (!sendData.station) {
            layer.msg("岗位不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.duty = $("#work_zhiwu_" + ind).val();
        if (!sendData.duty) {
            layer.msg("职务不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return;
        }
        sendData.userProjectList = [];

        var cacheElement = table.cache['historytable' + ind];
        if (cacheElement && cacheElement.length > 0) {
            for (var a = 0; a < cacheElement.length; a++) {
                var aPro = {};
                if (cacheElement[a]['LAY_TABLE_INDEX'] != undefined) {
                    aPro.supArea = cacheElement[a].supArea;
                    aPro.supHtMoney = cacheElement[a].supHtMoney;
                    aPro.supName = cacheElement[a].supName;
                    aPro.supRemark = cacheElement[a].supRemark;
                    aPro.supRole = cacheElement[a].supRole;
                    aPro.supTzMoney = cacheElement[a].supTzMoney;
                    aPro.supId = cacheElement[a].supId;
                    aPro.suweId = cacheElement[a].suweId;
                    aPro.tableInd = cacheElement[a].LAY_TABLE_INDEX;
                    sendData.userProjectList.push(aPro);
                }
            }
        }
        sendData.suwInd = ind;
        if (deledWorkExIds.length > 0) {
            sendData.deledWorkExIds = deledWorkExIds;
        }
        if (deledProjectIds.length > 0) {
            sendData.deledProjectIds = deledProjectIds;
        }
        saveWorkEx(sendData, ind).then(function (data) {
            getProjectList(data);
        });
    }


    function getAWrokData(e) {
        var sendData = {};
        var ind = $(e).attr('ind');
        sendData.suweId = $("#work_history_suweid_" + ind).val();
        sendData.suwInd = $("#work_history_suweid_" + ind).attr('suwind');
        sendData.startDate = $("#work_start_" + ind).val();
        if (!sendData.startDate) {
            layer.msg("开始时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return false;
        }
        sendData.endDate = $("#work_end_" + ind).val();
        if (!sendData.endDate) {
            layer.msg("结束时间不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return false;
        }
        sendData.workUnit = $("#work_unit_" + ind).val();
        if (!sendData.workUnit) {
            layer.msg("工作单位不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return false;
        }
        sendData.station = $("#work_gangwei_" + ind).val();
        if (!sendData.station) {
            layer.msg("岗位不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return false;
        }
        sendData.duty = $("#work_zhiwu_" + ind).val();
        if (!sendData.duty) {
            layer.msg("职务不能为空!", {icon: 5, anim: 6, offset: 'c'});
            return false;
        }
        sendData.userProjectList = [];

        var cacheElement = table.cache['historytable' + ind];
        if (cacheElement && cacheElement.length > 0) {
            for (var a = 0; a < cacheElement.length; a++) {
                var aPro = {};
                if (cacheElement[a]['LAY_TABLE_INDEX'] != undefined) {
                    aPro.supArea = cacheElement[a].supArea;
                    aPro.supHtMoney = cacheElement[a].supHtMoney;
                    aPro.supName = cacheElement[a].supName;
                    aPro.supRemark = cacheElement[a].supRemark;
                    aPro.supRole = cacheElement[a].supRole;
                    aPro.supTzMoney = cacheElement[a].supTzMoney;
                    aPro.supId = cacheElement[a].supId;
                    aPro.suweId = cacheElement[a].suweId;
                    aPro.tableInd = cacheElement[a].LAY_TABLE_INDEX;
                    sendData.userProjectList.push(aPro);
                }
            }
        }
        sendData.suwInd = ind;
        return sendData;
        // if(deledWorkExIds.length > 0){
        //     sendData.deledWorkExIds = deledWorkExIds;
        // }
        // if(deledProjectIds.length > 0){
        //     sendData.deledProjectIds = deledProjectIds;
        // }
        // saveWorkEx(sendData,ind).then(function(data){
        //     getProjectList(data);
        // });
    }

    function saveWorks() {
        var historys = $('.a_history');
        var sendDataList = [];
        for (var a = 0; a < historys.length; a++) {
            var aHistory = historys[a];
            var saveBtn = $(aHistory).find('.work-save-btn');
            var aWorkData = getAWrokData(saveBtn);
            if (aWorkData) {
                sendDataList.push(aWorkData);
            } else {
                return;
            }

        }
        if (sendDataList.length > 0) {
            $.ajax({
                url: '/workEx/saveWorks',
                data: JSON.stringify(sendDataList),
                type: 'post',
                contentType: "application/json;",
                dataType: 'json',
                success: function (res) {
                    if (res.flag) {
                        layer.msg("保存成功", {icon: 1});
                    } else {
                        layer.msg("保存失败," + res.msg, {icon: 2});
                    }
                },
                fail: function (res) {

                },
                error: function (res) {
                    layer.msg('系统异常,请联系管理员', {icon: 2});
                }
            })
        }
    }

    function saveWorkEx(sendData, ind) {
        return new Promise(function (resolve, reject) {
            //做一些异步操作
            $.ajax({
                url: '/workEx/saveWork',
                data: JSON.stringify(sendData),
                type: 'post',
                contentType: "application/json;",
                dataType: 'json',
                success: function (res) {
                    if (res.flag) {
                        $("#work_history_suweid_" + ind).val(res.data);
                        deledWorkExIds = [];
                        deledProjectIds = [];
                        //刷新表格
                        var nextData = {};
                        nextData.suweid = res.data;
                        nextData.ind = ind;
                        layer.msg("操作成功", {icon: 1});
                        flushAuditStatus();
                        resolve(nextData);
                    } else {
                        layer.msg(res.message, {icon: 5, anim: 6, offset: 'c'});
                    }
                }
            })
        });
    }

    function getProjectList(data) {
        if (data.suweid) {
            $.ajax({
                url: '/workEx/projectList',
                data: {suweId: data.suweid},
                type: 'post',
                dataType: 'json',
                success: function (result) {
                    if (result) {
                        table.reload('historytable' + data.ind, {
                            data: result
                        });
                    }
                }
            })
        }
    }


    function clearWork() {
        $.ajax({
            url: '/workEx/deleteAll',
            type: 'post',
            dataType: 'json',
            success: function (res) {
                if (!res.flag) {
                    layer.msg(res.message, {icon: 5, anim: 6, offset: 'c'});
                }
            }
        })
    }

    function checkPhoto(mark, name) {
        if (!($("." + mark + "_img").attr("src"))) {
            $("html, body").animate({scrollTop: $("#" + mark + "_div").offset().top - 100}, 500)
            $("#" + mark + "_div").css('border', '1px dashed red');
            setTimeout(function () {
                $("#" + mark + "_div").css('border', '1px dashed #3D6AFF');
            }, 2000);
            layer.msg("请上传" + name + "照片", {icon: 2});
            return false;
        }
        ;
        return true;
    }

    function seeEnvDetail(e) {
        var spId = $(e).attr('spid');
        var w = "";
        var h = "";
        if (w == null || w == '') {
            w = ($(window).width() * 0.9);
        }
        ;
        if (h == null || h == '') {
            h = ($(window).height() * 0.9);
        }
        parent.layer.open({
            type: 2,
            area: [w + 'px', h + 'px'],
            title: false,
            closeBtn: 0, //不显示关闭按钮
            shade: 0.8,
            content: '/supervisor/projectManager/evaluationResult?spId=' + spId, //iframe的url，no代表不显示滚动条
        });
    }

    function delAChild(e) {

        layer.confirm('确定删除吗?', function (index) {
            var sufId = $(e).parents('.aChildRow').find('.sufId-input').val();
            if (sufId) {
                delChildDb(sufId);
            }
            $(e).parents('.aChildRow').remove();
            flushChildsInd();
            layer.close(index);
        });
    }

    function delChildDb(sufId) {
        $.ajax({
            url: '/sys/personCenter/delUserFamily',
            data: {sufId: sufId},
            type: 'post',
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    // layer.msg("操作成功",{icon:1});
                }
            },
            error: function (res) {
                layer.msg("系统出错", {icon: 5, anim: 6, offset: 'c'});
            }
        })
    }

    function flushChildsInd() {
        //重置每行的下表：
        var childs = $(".aChildRow");
        if (childs && childs.length > 0) {
            for (var a = 0; a < childs.length; a++) {
                $(childs[a]).find('input.relationship-input').attr('name', 'familys[' + (a + 1) + '].sufRelationship');
                $(childs[a]).find('input.sufId-input').attr('name', 'familys[' + (a + 1) + '].sufId');
                $(childs[a]).find('input.ind-input').attr('name', 'familys[' + (a + 1) + '].ind');
                $(childs[a]).find('input.sufName-input').attr('name', 'familys[' + (a + 1) + '].sufName');
                $(childs[a]).find('input.birthday-input').attr('name', 'familys[' + (a + 1) + '].sufBirthday');
                $(childs[a]).find('input.birthday-input').attr('id', 'child-birth-date-' + (a + 1));
                $(childs[a]).find('input.schoolInfo-input').attr('name', 'familys[' + (a + 1) + '].sufSchoolInfo');
                laydate.render({
                    elem: '#child-birth-date-' + (a + 1)
                })
            }
        }
    }

    function flushStudy() {
        //删除原有，获取最新，渲染：
        delAllStudy();
        getNewStudy();
    }

    function flushTrain() {
        //删除原有，获取最新，渲染：
        delAllTrain();
        getNewTrain();
    }

    function getNewStudy() {
        var url = '/sys/personCenter/getUserStudy';
        if (shenhe) {
            url = url + '?userId=' + shenheinguserid;
        }
        $.ajax({
            url: url,
            type: 'get',
            cache: false,
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    if (res.data && res.data.length > 0) {
                        var studys = res.data;
                        for (var a = 0; a < studys.length; a++) {
                            var astudy = studys[a];
                            addOneStudy(astudy);
                        }
                    } else {
                        addOneStudy();
                    }
                }
            }
        })
    }

    function getNewTrain() {
        var url = '/sys/personCenter/getUserTrain';
        if (shenhe) {
            url = url + '?userId=' + shenheinguserid;
        }
        $.ajax({
            url: url,
            type: 'get',
            cache: false,
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    if (res.data && res.data.length > 0) {
                        var trains = res.data;
                        for (var a = 0; a < trains.length; a++) {
                            var aTrain = trains[a];
                            addOneTrain(aTrain);
                        }
                    } else {
                        addOneTrain();
                    }
                }
            }
        })
    }

    function delAllStudy() {
        $(".astudy").remove();
    }

    function delAllTrain() {
        $(".atrain").remove();
    }

    function saveStudy() {
        var sendData = [];
        var studys = $(".astudy");
        if (studys && studys.length > 0) ;
        for (var a = 0; a < studys.length; a++) {
            var study = {};
            var susId = $(studys[a]).find('.susId').val();
            if (susId) {
                study.susId = susId;
            }
            var startTime = $(studys[a]).find('.susStartTime').val();
            if (startTime) {
                study.susStartTime = startTime;
            }
            var endTime = $(studys[a]).find('.susEndTime').val();
            if (endTime) {
                study.susEndTime = endTime;
            }
            // var schoolName = $(studys[a]).find('.susSchoolName').val();
            // if (schoolName) {
            //     study.susSchoolName = schoolName;
            // } else {
            //     layer.msg("学校不能为空", {icon: 5, anim: 6, offset: 'c'});
            //     return;
            // }
            // var subject = $(studys[a]).find('.susSubject').val();
            // if (subject) {
            //     study.susSubject = subject;
            // } else {
            //     layer.msg("专业不能为空", {icon: 5, anim: 6, offset: 'c'});
            //     return;
            // }
            var eduName = $(studys[a]).find('.susEduName').val();
            if (eduName) {
                study.susEduName = eduName;
            }
            var job = $(studys[a]).find('.susJob').val();
            if (job) {
                study.susJob = job;
            }
            var degree = $(studys[a]).find('.susDegree').val();
            if (degree) {
                study.susDegree = degree;
            }
            var type = "1";
            study.susType = type;
            study.susInd = a;
            sendData.push(study);
        }
        $.ajax({
            url: '/sys/personCenter/saveStudy',
            data: JSON.stringify(sendData),
            type: 'post',
            contentType: 'application/json;charset=UTF-8',
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    layer.msg("保存成功", {icon: 1});
                    $(".study_history").css('height', ($(".study_history")[0].clientHeight - 60) + "px");
                    flushAuditStatus();
                }
            },
            error: function (res) {
                layer.msg("系统出错", {icon: 5, anim: 6, offset: 'c'});
            }
        })
    }

    function saveTrain() {
        var sendData = [];
        var trains = $(".atrain");
        if (trains && trains.length > 0) ;
        for (var a = 0; a < trains.length; a++) {
            var train = {};
            var susId = $(trains[a]).find('.susId').val();
            if (susId) {
                train.susId = susId;
            }
            var endTime = $(trains[a]).find('.susEndTime').val();
            if (endTime) {
                train.susEndTime = endTime;
            } else {
                layer.msg("参加时间不能为空", {icon: 2});
                return;
            }
            var schoolName = $(trains[a]).find('.susSchoolName').val();
            if (schoolName) {
                train.susSchoolName = schoolName;
            } else {
                layer.msg("培训名称不能为空", {icon: 2});
                return;
            }
            var susCertName = $(trains[a]).find('.susCertName').val();
            if (susCertName) {
                train.susCertName = susCertName;
            }
            var susStudyTime = $(trains[a]).find('.susStudyTime').val();
            if (susStudyTime) {
                train.susStudyTime = susStudyTime;
            }
            var susAuthority = $(trains[a]).find('.susAuthority').val();
            if (susAuthority) {
                train.susAuthority = susAuthority;
            }
            var type = "2";
            train.susType = type;
            train.susInd = a;
            sendData.push(train);
        }
        $.ajax({
            url: '/sys/personCenter/saveStudy',
            data: JSON.stringify(sendData),
            type: 'post',
            contentType: 'application/json;charset=UTF-8',
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    layer.msg("保存成功", {icon: 1});
                    flushAuditStatus();
                }
            },
            error: function (res) {
                layer.msg("系统出错", {icon: 5, anim: 6, offset: 'c'});
            }
        })
    }

    //添加一个教育经历
    function addOneStudy(data) {
        var newstudyInd = '';
        if (data && data.susInd) {
            newstudyInd = data.susInd;
        } else {
            //获取教育经历的最后一个的下标:
            var theLastStudyInd = $(".study").find(".astudy:last").find('.susInd').val();
            if (!theLastStudyInd) {
                newstudyInd = 0;
            } else {
                newstudyInd = (theLastStudyInd * 1) + 1
            }
        }
        var startTime = (data && data.susStartTime != undefined) ? data.susStartTime : "";
        var endTime = (data && data.susEndTime != undefined) ? data.susEndTime : "";
        var schoolName = (data && data.susSchoolName != undefined) ? data.susSchoolName : "";
        var subject = (data && data.susSubject != undefined) ? data.susSubject : "";
        var eduName = (data && data.susEduName != undefined) ? data.susEduName : "";
        var degree = (data && data.susDegree != undefined) ? data.susDegree : "";
        var susId = (data && data.susId != undefined) ? data.susId : "";
        if (!susId) {
            susId = getNewSusId();
        }
        var delImg = '';
        if (shenhe != '1') {
            delImg = '            <img src="${re.contextPath}/plugin/common/images/del.png"' +
                '                 onclick="delStudy(this)" alt="" class="fr cursor" ind="0"' +
                '                 style="width:32px">';
        }
        $(".study").append(
            '<div class="a_history_head layui-row layui-form-item astudy" style="margin-bottom: 0px">' +
            '<input type="hidden" name="susId" class="susId" value="' + susId + '">' +
            '<input type="hidden" name="susInd" class="susInd" value="' + newstudyInd + '">' +
            '<div class="layui-inline  layui-col-md1 w25p">' +
            '    <span class="layui-col-sm3" style="margin-right:2%">选择时间</span>' +
            '    <div class="layui-col-md4">' +
            '        <input id="study_start_' + newstudyInd + '" type="text" lay-verify="date" placeholder="开始时间" autocomplete="off" class="layui-input layui-col-sm4 susStartTime" style="width:100%" value="' + startTime + '">' +
            '    </div>' +
            '    <div class="layui-col-md4">' +
            '        <input id="study_end_' + newstudyInd + '" type="text" lay-verify="date" placeholder="结束时间" autocomplete="off" class="layui-input layui-col-sm4 susEndTime" style="width:100%" value="' + endTime + '">' +
            '    </div>' +
            '</div>' +
            '<div class="layui-inline layui-col-md1 w20p">' +
            '    <span class="mr10 layui-col-sm2" style="width:18%">学校</span>' +
            '    <div class="layui-col-md9">' +
            '        <input type="text" name="susSchoolName" lay-verify="title" autocomplete="off" placeholder="请输入学校" class="layui-input susSchoolName" value="' + schoolName + '" onBlur="inputBlur(this)">' +
            '    </div>' +
            '</div>' +
            '<div class="layui-inline layui-col-md1 w20p">' +
            '   <span class="mr10 layui-col-sm2" style="width:18%">专业</span>' +
            '   <div class="layui-col-sm9">' +
            '        <input type="text" name="susSubject" lay-verify="title" autocomplete="off" placeholder="请输入专业" class="layui-input susSubject" value="' + subject + '" onBlur="inputBlur(this)">' +
            '    </div>' +
            '</div>' +
            '<div class="layui-inline layui-col-md2 w15p">' +
            '    <span class="mr10 layui-col-sm2">学历</span>' +
            '    <div class="layui-col-sm9">' +
            '        <input type="text" name="susEduName" lay-verify="title" autocomplete="off" placeholder="请输入学历" class="layui-input susEduName" value="' + eduName + '" onBlur="inputBlur(this)">' +
            '    </div>' +
            '</div>' +
            // '<div class="layui-inline layui-col-md1 w15p">'+
            // '     <span class="mr10 layui-col-sm2">职务</span>'+
            // '     <div class="layui-col-sm9">'+
            // '        <input type="text" name="sysUserWorkExperienceList[0].duty" lay-verify="title" autocomplete="off" placeholder="请输入职务" class="layui-input susJob" value="'+job+'" onBlur="inputBlur(this)">'+
            // '    </div>'+
            // '</div>'+
            '<div class="layui-inline layui-col-md1 w15p">' +
            '    <span class="mr10 layui-col-sm2">学位</span>' +
            '    <div class="layui-col-sm9">' +
            '        <input type="text" lay-verify="title" autocomplete="off" placeholder="请输入学位" class="layui-input susDegree" value="' + degree + '" onBlur="inputBlur(this)">' +
            '    </div>' +
            '</div>' +
            '<div class="layui-inline ml10">' +
            '        <div class="layui-col-md2">' +
            delImg +
            '        </div>' +
            '    </div>' +
            '</div>');

        laydate.render({
            elem: '#study_start_' + newstudyInd
        })
        laydate.render({
            elem: '#study_end_' + newstudyInd
        })
    }


    //添加一个教育经历
    function addOneTrain(data) {
        var newTrainInd = '';
        if (data && data.susInd) {
            newTrainInd = data.susInd;
        } else {
            //获取教育经历的最后一个的下标:
            var theLastStudyInd = $(".train").find(".atrain:last").find('.susInd').val();
            if (!theLastStudyInd) {
                newTrainInd = 0;
            } else {
                newTrainInd = (theLastStudyInd * 1) + 1
            }
        }
        var endTime = (data && data.susEndTime != undefined) ? data.susEndTime : "";
        var schoolName = (data && data.susSchoolName != undefined) ? data.susSchoolName : "";
        var susCertName = (data && data.susCertName != undefined) ? data.susCertName : "";
        var susStudyTime = (data && data.susStudyTime != undefined) ? data.susStudyTime : "";
        var susAuthority = (data && data.susAuthority != undefined) ? data.susAuthority : "";
        var susId = (data && data.susId != undefined) ? data.susId : "";
        if (!susId) {
            susId = getNewSusId();
        }
        var delImg = '';
        if (shenhe != '1') {
            delImg = '            <img src="${re.contextPath}/plugin/common/images/del.png"' +
                '                 onclick="delTrain(this)" alt="" class="fr cursor" ind="0"' +
                '                 style="width:32px">';
        }
        $(".train").append(
            '<div class="work_history_out a_history_head layui-row layui-form-item atrain">' +
            '<input type="hidden" class="susId" value="' + susId + '">' +
            '<input type="hidden" name="susInd" class="susInd" value="' + newTrainInd + '">' +
            '    <div class="layui-inline  layui-col-md1 w15p">' +
            '        <span class="layui-col-sm4" style="margin-right:4%">参加时间</span>' +
            '        <div class="layui-col-md7">' +
            '            <input type="text" id="train_start_' + newTrainInd + '" name="startDate" lay-verify="date" placeholder="获得时间" autocomplete="off" class="layui-input layui-col-sm4 susEndTime" value="' + endTime + '">' +
            '         </div>' +
            '    </div>' +
            '    <div class="layui-inline layui-col-md1 w25p">' +
            '        <span class="mr10 layui-col-sm2" style="width:20%">培训名称</span>' +
            '        <div class="layui-col-md9">' +
            '            <input type="text" name="susSchoolName" lay-verify="title" autocomplete="off" placeholder="请输入培训名称" class="layui-input susSchoolName" value="' + schoolName + '" onBlur="inputBlur(this)">' +
            '        </div>' +
            '    </div>' +
            '    <div class="layui-inline layui-col-md1 w25p">' +
            '        <span class="mr10 layui-col-sm1" style="width:10%">证书</span>' +
            '        <div class="layui-col-sm10">' +
            '            <input type="text" name="susCertName" lay-verify="title" autocomplete="off" placeholder="请输入证书名称" class="layui-input susCertName" value="' + susCertName + '" onBlur="inputBlur(this)">' +
            '        </div>' +
            '    </div>' +
            '    <div class="layui-inline layui-col-md1 w10p">' +
            '        <span class="mr10 layui-col-sm3">学时</span>' +
            '        <div class="layui-col-sm7">' +
            '            <input type="text" name="susStudyTime" lay-verify="title" autocomplete="off" placeholder="请输入学时" class="layui-input susStudyTime" value="' + susStudyTime + '" onBlur="inputBlur(this)">' +
            '        </div>' +
            '    </div>' +
            '    <div class="layui-inline layui-col-md2 w20p">' +
            '        <span class="mr10 layui-col-sm3">发证机关</span>' +
            '        <div class="layui-col-sm8">' +
            '            <input type="text" name="susAuthority" lay-verify="title" autocomplete="off" placeholder="请输入发证机关" class="layui-input susAuthority" value="' + susAuthority + '" onBlur="inputBlur(this)">' +
            '        </div>' +
            '    </div>' +
            '    <div class="layui-inline ml10">' +
            '        <div class="layui-col-md2">' +
            delImg +
            '        </div>' +
            '    </div>' +
            '</div>'
        );

        laydate.render({
            elem: '#train_start_' + newTrainInd
        })
    }


    function getNewSusId() {
        return Date.now() + (Math.random() * 1000000).toString().substr(0, 3);
    }

    function delStudy(e) {
        var that = $(e);
        layer.confirm('确定删除?', function (index) {
            var susId = that.parents('.astudy').find('.susId').val();
            if (susId) {
                //去后台数据库删除：
                delStudyDB(susId);
            }
            that.parents('.astudy').remove();
            layer.close(index);
            //向服务端发送删除指令
        });
    }

    function delTrain(e) {
        var that = $(e);
        layer.confirm('确定删除?', function (index) {
            var susId = that.parents('.atrain').find('.susId').val();
            if (susId) {
                //去后台数据库删除：
                delStudyDB(susId);
            }
            that.parents('.atrain').remove();
            layer.close(index);
            //向服务端发送删除指令
        });
    }

    function delStudyDB(susId) {
        if (susId) {
            $.ajax({
                url: '/sys/personCenter/delUserStudy',
                data: {susId: susId},
                type: 'post',

                dataType: 'json',
                success: function (res) {
                    if (res.flag) {
                        layer.msg("操作成功", {icon: 1});
                    }
                },
                error: function (res) {
                    layer.msg("系统出错", {icon: 5, anim: 6, offset: 'c'});
                }
            })
        }
    }


    function addOneChild(data) {
        var newInd = $(".aChildRow").length + 1;
        var relationship = '4';
        if (data && data.sufRelationship) {
            relationship = data.sufRelationship;
        }
        var sufId = '';
        if (data && data.sufId) {
            sufId = data.sufId;
        }
        var sufName = '';
        if (data && data.sufName) {
            sufName = data.sufName;
        }
        var sufBirthday = '';
        if (data && data.sufBirthday) {
            sufBirthday = data.sufBirthday;
        }
        var sufSchoolInfo = '';
        if (data && data.sufSchoolInfo) {
            sufSchoolInfo = data.sufSchoolInfo;
        }
        var delImg = '';
        if (shenhe != '1') {
            delImg = '<img class="cursor" src="${re.contextPath}/plugin/common/images/del.png" onclick="delAChild(this)">';
        }

        $(".childs").append('<div class="layui-row mt20 aChildRow">' +
            '<div class="layui-col-sm3 w30p">' +
            '<div class="layui-col-sm4">' +
            '<span class="fr pr12">子女姓名</span>' +
            '</div>' +
            '<div class="layui-col-sm8">' +
            '<input class="relationship-input" type="hidden" name="familys[' + newInd + '].sufRelationship" value="' + relationship + '">' +
            '<input class="sufId-input" type="hidden" name="familys[' + newInd + '].sufId" value="' + sufId + '">' +
            '<input class="ind-input" type="hidden" name="familys[' + newInd + '].ind" value="' + newInd + '">' +
            '<input class="pl10 sufName-input" name="familys[' + newInd + '].sufName" type="text" placeholder="请输入子女姓名" value="' + sufName + '" onBlur="inputBlur(this)">' +
            '</div>' +
            '</div>' +
            '<div class="layui-col-sm3 w30p">' +
            '<div class="layui-col-sm4">' +
            '<span class="fr pr12 birth-date-span">子女出生日期</span>' +
            '</div>' +
            '<div class="layui-col-sm8">' +
            '<input id="child-birth-date-' + newInd + '" class="pl10 birthday-input" name="familys[' + newInd + '].sufBirthday" type="text" placeholder="请输入出生日期" value="' + sufBirthday + '">' +
            '</div>' +
            '</div>' +
            '<div class="layui-col-sm3 w30p">' +
            '<div class="layui-col-sm4">' +
            '<span class="fr pr12">子女入学情况</span>' +
            '</div>' +
            '<div class="layui-col-sm8">' +
            '<input class="pl10 schoolInfo-input" name="familys[' + newInd + '].sufSchoolInfo" type="text" placeholder="请输入子女入学情况" value="' + sufSchoolInfo + '" onBlur="inputBlur(this)">' +
            '</div>' +
            '</div>' +
            '<div class="layui-col-md1 w10p">' +
            delImg +
            '</div>' +
            '</div>'
        )
        laydate.render({
            elem: '#child-birth-date-' + newInd
        })

    }

    //  邮箱
    function checkEmail(e) {
        var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        // var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
        var obj = $(e).val().trim();
        if (obj) { //输入不能为空
            if (!reg.test(obj)) { //正则验证不通过，格式不对
                layer.msg("请输入正确的邮箱格式!", {icon: 5, anim: 6, offset: 'c'});
                $(e).val('');
                return false;
            }
        }
    }

    function dobestChange() {
        //查询选中的个数，如果大于四个，disable其余的没选中的
        var checked = $('input[type=checkbox]:checked').length;
        if (checked >= 5) {
            $('input[type=checkbox]:not(:checked)').attr('disabled', 'disabled');
        } else {
            $('input[type=checkbox]:not(:checked)').removeAttr('disabled');
        }
    }

    function LimitTextArea(field) {
        maxlimit = 200;
        if (field.value.length > maxlimit) {
            field.value = field.value.substring(0, maxlimit);
        }
    }

    function getId() {
        return Date.now() + (Math.random() * 1000000).toString().substr(0, 3);
    }

    function pass() {
        var auditStatus = '1';
        var sendData = {
            id: $("#id").val(),
            auditStatus: '1'
        }
        audit(sendData);
    }

    function noPass() {
        layer.prompt({title: '拒绝原因', formType: 2}, function (text, index) {
            if (text.length > 60) {
                layer.msg("超出限制60字", {icon: 2});
                return;
            }
            layer.close(index);
            var sendData = {
                id: $("#id").val(),
                auditStatus: '2',
                auditFailReason: text
            }
            audit(sendData);
        });

    }

    function flushAuditStatus() {
        $.ajax({
            url: '/sys/personCenter/getAuditStatus',
            data: {id: $("#id").val()},
            type: 'get',
            cache: false,
            dataType: 'json',
            success: function (res) {
                if (res && res.flag) {
                    var newAuditStatus = res.data;
                    if (newAuditStatus) {
                        $(".audit-status:not(.audit-status" + newAuditStatus + ")").attr('hidden', 'true');
                        $(".audit-status" + newAuditStatus).show();
                        if (newAuditStatus == '2') {
                            $(".audit-status" + newAuditStatus).html('信息审核未通过，驳回原因：' + res.msg);
                        }
                    }
                } else {
                    layer.msg(res.msg, {icon: 2});
                }
            }
        })
    }

    function audit(data) {
        $.ajax({
            url: '/sys/personCenter/audit',
            data: data,
            type: 'post',
            dataType: 'json',
            success: function (res) {
                if (res.flag) {
                    layer.msg('操作成功', {icon: 1});
                    closeThisPage();
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        });
    }

    function closeThisPage() {
        //关闭当前页面
        setTimeout(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        }, 1000);
    }

    function deleteImg(e, i, j) {
        var imgid = $(j).attr('data-id')
        var imgtype = $(j).attr('data-type')
        parent.layer.confirm('确定删除？', function (index) {
            $.ajax({
                url: '/sys/personCenter/delUserImage',
                data: {type: imgtype},
                type: 'post',
                cache: false,
                dataType: 'json',
                success: function (res) {
                    if (res && res.flag) {
                        layer.msg(res.msg, {icon: 1});
                        $('#' + imgid).removeAttr('src')
                        $(j).hide();
                        parent.layer.close(index);
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });


    }

    setTimeout(function () {
        var childListJson = '${childList}';
        if (childListJson) {
            var childList = JSON.parse(childListJson);
            if (childList.length > 0) {
                for (var i = 0; i < childList.length; i++) {
                    var aData = childList[i];
                    addOneChild(aData);
                }
            } else {
                addOneChild();
            }
        }
    }, 1200)

</script>
</body>
</html>
